java 15294

  1. Why is it faster to process a sorted array than an unsorted array?
  2. What and where are the stack and heap?
  3. Why is subtracting these two times (in 1927) giving a strange result?
  4. Is Java “pass-by-reference” or “pass-by-value”?
  5. Avoiding != null statements
  6. Java's +=, -=, *=, /= compound assignment operators
  7. Read/convert an InputStream to a String
  8. Proper use cases for Android UserManager.isUserAGoat()?
  9. Differences between HashMap and Hashtable?
  10. Create ArrayList from array
  11. How do I generate random integers within a specific range in Java?
  12. Why is char[] preferred over String for passwords?
  13. Iterate through a HashMap
  14. Creating a memory leak with Java
  15. When to use LinkedList over ArrayList?
  16. How to convert a String to an int in Java?
  17. Why is printing “B” dramatically slower than printing “#”?
  18. What is a serialVersionUID and why should I use it?
  19. In Java, difference between package private, public, protected, and private
  20. How to efficiently iterate over each Entry in a Map?
  21. How do I test a class that has private methods, fields or inner classes?
  22. Initialization of an ArrayList in one line
  23. How can I create an executable JAR with dependencies using Maven?
  24. Using to fire and handle HTTP requests
  25. How can I test if an array contains a certain value?
  26. “implements Runnable” vs. “extends Thread”
  27. How do I call one constructor from another in Java?
  28. Does finally always execute in Java?
  29. Why does this code using random strings print “hello world”?
  30. What is reflection and why is it useful?
  31. How to avoid Java code in JSP files?
  32. Lookup enum by string value
  33. How do I declare and initialize an array in Java?
  34. Breaking out of nested loops in Java
  35. How do you assert that a certain exception is thrown in JUnit 4 tests?
  36. What's the simplest way to print a Java array?
  37. Java inner class and static nested class
  38. How to generate a random alpha-numeric string?
  39. How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version
  40. Sort a Map<Key, Value> by values (Java)
  41. Comparing Java enum members: == or equals()?
  42. How can I permanently enable line numbers in IntelliJ?
  43. What's the difference between @Component, @Repository & @Service annotations in Spring?
  44. Difference between StringBuilder and StringBuffer
  45. Why use getters and setters/accessors?
  46. Why is executing Java code in comments with certain Unicode characters allowed?
  47. What is a JavaBean exactly?
  48. Does Java support default parameter values?
  49. Dealing with “java.lang.OutOfMemoryError: PermGen space” error
  50. How to split a string in Java