Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 JAVA


  Seven Java projects that changed the world

O\'Reilly is celebrating the release of Java 7, and our inaugural OSCON Java conference: July 25-27 in Portland, Ore. Java\'s open source ecosystem is strong and healthy, one of the primary reasons for our creation of OSCON Java. Over the last decade, several projects have traveled beyond mere adoption and had effects dominating the Java world, into software development in general, and some even further into the daily lives of users. JUnitPorted to Java by Kent Beck and Erich Gamma from Beck\'s work in unit testing in Smalltalk, JUnit has been largely responsible for popularizing test-driven d...

11,747 0       JAVA PROJECTS PROMINENT ECLIPSE SUE


  What will the value of Integer.valueOf(127) == Integer.valueOf(127) be in Java?

Do you really understand how Java does the integer comparison? OK, ignore the statements in the post title. What we are interested in is another set of comparison statements. Let's first see below code snippet.public class IntegerComparison { public static void main(String[] args) { Integer a = 127, b = 127; Integer c = 128, d = 128; System.out.println(a == b); System.out.println(c == d); }}What do you think the output will be? Are they both displaying true? You will find out the answer after reading through how Java optimizes some of the integer comparison logic.First, you need to un...

11,356 3       JAVA == EQUALSTO


  Signature sign/verification demo in Java

Digital signature is commonly used in areas where data authentication and integrity are required. It is extremely important to have signature while transferring sensitive data from one peer to other peers through network since there might be malicious applications or man-in-the-middle attacks which may alter the data along the way.Java provides some APIs to generate and verify digital signature. One important class is Signature. When generating the signature, a private key needs to be passed to initSign()When verifying the signature, a public key needs to be passed to initVerify()Java use...

10,890 0       JAVA SECURITY SIGNATURE


  Solution to getKeyCode() returns 0 in Java

The getKeyChar method always returns a valid Unicode character or CHAR_UNDEFINED. Character input is reported by KEY_TYPED events: KEY_PRESSED and KEY_RELEASED events are not necessarily associated with character input. Therefore, the result of the getKeyChar method is guaranteed to be meaningful only for KEY_TYPED events.For key pressed and key released events, the getKeyCode method returns the event's keyCode. For key typed events, the getKeyCode method always returns VK_UNDEFINED....

10,740 0       JAVA KEYCODE 0 KEYLISTENER


  Why using + to concatenate string in Java loop is not a good option

String concatenation is a common operation in Java programming. It is to concatenate multiple strings into a single string. Java provides a String class which is an immutable class which means the object cannot be mutated once instantiated.Once a String object is instantiated, its properties cannot be changed anymore, so when concatenating strings, it's actually create a new String instance to store the concatenated string values. For example, below is a simple string concatenation example.String s = "abcd";s = s.concat("ef");When this piece of code is executed, a new String instance is create...

10,102 0       JAVA 8 STRING JAVA


  Browse OpenJDK Java source code in Eclipse

Java 8 was recently released, many developers are now trying to extract the source code of Java 8 to find out how the new added features such as Lambda expressions, default method in interfaces, new Time API are implemented. How do you manage to download and browse the source code? Today we are going to show how to extract OpenJDK Java source code to Eclipse.Since OpenJDK is adopting Mercurial as its distributed version control system, you need to install Mercurial on your computer first before you can clone the repository from OpenJDK. You can get more info about the use of Mercurial in OpenJ...

9,391 0       SOURCE CODE ECLIPSE JAVA 8 OPENJDK


  How many Java programmers are there in the world?

Oracle says its 9,000,000, Wikipedia says its 10 million, NumberOf.net gives the exact number of Java programmers, 9007346.But how many Java programmers are there really? We cannot call everyone on the planet to ask whether he/she is a Java programmer or not.So we can only rely on some indirect methods to estimate, such as government statistics (There are around 43 million programmers in the world), TIOBE and Langpop, Employment portals, Eclipse and Tomcat download numbers.Download number of Eclipse :Eclipse Juno -- 8,000,000Eclipse Indigo -- 6,000,000Eclipse Helios --4,100,000Eclipse Galileo ...

9,325 0       NUMBER JAVA PROGRAMMER


  Java Interview Questions

Currently there are many articles online which summarize the list of Java interview questions. Some cover lots of basic questions and some cover some specific questions in specific area such as multithreading. In this post, we will not cover the really basic questions, we will cover something different. For basic question, you can read Java Interview Questions。BasicWhat is primitive data type? How many primitive data types in Java? What are they?-- A primitive type is predefined by the language and is named by a reserved keyword. Primitive values do not share state with other ...

9,030 0       JAVA SECURITY INTERVIEW CAREER MULTITHREADING QUESTION JAVA INTERVIEW JAVA CORE