Tag: java

22252 Why is it faster to process a sorted array than an unsorted array? 2012-06-27T13:51:36.160

6190 Why is subtracting these two times (in 1927) giving a strange result? 2011-07-27T08:15:58.380

5595 Is Java "pass-by-reference" or "pass-by-value"? 2008-09-02T20:14:29.270

3662 Avoiding != null statements 2008-11-07T08:31:40.203

3415 How to read / convert an InputStream into a String in Java? 2008-11-21T16:47:40.287

3361 Why don't Java's +=, -=, *=, /= compound assignment operators require casting? 2012-01-03T10:10:32.037

3256 Differences between HashMap and Hashtable? 2008-09-02T20:12:00.117

3242 Proper use cases for Android UserManager.isUserAGoat()? 2012-11-14T08:34:01.523

3112 Create ArrayList from array 2008-10-01T14:38:32.667

3032 How to generate random integers within a specific range in Java? 2008-12-12T18:20:57.053

3015 Why is char[] preferred over String for passwords? 2012-01-16T14:20:42.473

2950 Iterate through a HashMap 2009-06-30T23:24:14.333

2775 Creating a memory leak with Java 2011-06-24T16:11:52.227

2686 How to efficiently iterate over each entry in a Java Map? 2008-09-05T21:12:48.370

2674 When to use LinkedList over ArrayList in Java? 2008-11-27T01:36:35.567

2659 What is the difference between public, protected, package-private and private in Java? 2008-10-18T19:53:12.187

2657 How do I convert a String to an int in Java? 2011-04-07T18:27:54.270

2597 What is a serialVersionUID and why should I use it? 2008-11-12T23:24:56.797

2484 Why is printing "B" dramatically slower than printing "#"? 2014-02-21T23:45:43.777

2307 Initialization of an ArrayList in one line 2009-06-17T04:10:20.000

2083 How do I fix android.os.NetworkOnMainThreadException? 2011-06-14T12:02:00.203

2032 How can I create an executable JAR with dependencies using Maven? 2009-02-22T08:43:45.460

2022 Does a finally block always get executed in Java? 2008-09-15T17:43:54.513

1954 How to determine whether an array contains a particular value in Java? 2009-07-15T00:03:21.820

1919 How do I call one constructor from another in Java? 2008-11-12T20:10:19.577

1854 "implements Runnable" vs "extends Thread" in Java 2009-02-12T14:28:46.393

1798 How to use java.net.URLConnection to fire and handle HTTP requests 2010-05-08T06:16:11.500

1773 What is reflection and why is it useful? 2008-09-01T08:39:21.633

1731 How do I declare and initialize an array in Java? 2009-07-29T14:22:27.243

1711 How do you assert that a certain exception is thrown in JUnit 4 tests? 2008-10-01T06:56:08.127

1684 How to get an enum value from a string value in Java? 2009-03-02T22:56:34.750

1652 What's the difference between @Component, @Repository & @Service annotations in Spring? 2011-07-26T09:10:46.560

1631 What's the simplest way to print a Java array? 2009-01-03T20:39:39.440

1630 Why does this code using random strings print "hello world"? 2013-03-03T04:38:06.147

1599 How to break out of nested loops in Java? 2009-05-20T09:07:43.643

1559 How to avoid Java code in JSP files? 2010-07-05T07:24:06.987

1537 Java inner class and static nested class 2008-09-16T08:22:35.727

1520 How to generate a random alpha-numeric string? 2008-09-03T02:58:43.073

1489 Comparing Java enum members: == or equals()? 2009-11-17T17:26:27.227

1436 Sort a Map<Key, Value> by values 2008-09-20T21:03:23.403

1433 How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version 2012-04-30T11:28:24.877

1431 What is a JavaBean exactly? 2010-07-21T00:41:11.187

1387 Difference between StringBuilder and StringBuffer 2008-12-10T04:34:26.263

1378 Does Java support default parameter values? 2009-06-15T18:04:28.277

1356 How to split a string in Java 2010-08-14T03:01:53.143

1352 Why use getters and setters/accessors? 2009-10-14T18:20:56.863

1293 How does the Java 'for each' loop work? 2008-09-17T16:44:32.360

1286 How do I create a Java string from the contents of a file? 2008-11-28T18:32:07.253

1282 Fastest way to determine if an integer's square root is an integer 2008-11-17T13:43:21.907

1273 Why is executing Java code in comments with certain Unicode characters allowed? 2015-06-09T09:02:16.973

1266 How can I convert a stack trace to a string? 2009-07-19T11:31:43.533

1256 Why does Java have transient fields? 2009-05-26T12:11:36.673

1196 How do I create a file and write to it in Java? 2010-05-21T19:58:55.167

1177 How can I concatenate two arrays in Java? 2008-09-17T06:14:23.763

1175 What exactly is Apache Camel? 2012-01-13T02:32:18.500

1154 'Must Override a Superclass Method' Errors after importing a project into Eclipse 2009-11-05T03:17:53.727

1143 Android SDK installation doesn't find JDK 2010-12-07T22:12:14.100

1138 Is null check needed before calling instanceof? 2010-06-01T13:53:15.297

1072 Difference between wait() and sleep() 2009-06-24T06:48:40.960

1066 How to round a number to n decimal places in Java 2008-09-30T16:01:34.613

1066 Iterating through a Collection, avoiding ConcurrentModificationException when modifying (removing) in loop 2008-10-21T23:23:33.123

1025 How do servlets work? Instantiation, sessions, shared variables and multithreading 2010-06-24T00:16:15.440

1006 What does "Could not find or load main class" mean? 2013-08-07T03:02:46.263

994 Sort ArrayList of custom Objects by property 2010-05-06T21:09:36.060

978 Convert ArrayList<String> to String[] array 2011-03-21T05:57:59.193

972 How can I initialise a static Map? 2009-02-03T15:41:33.080

954 Download a file with Android, and showing the progress in a ProgressDialog 2010-06-12T10:22:56.903

944 Hibernate hbm2ddl.auto possible values and what they do? 2009-01-13T06:40:48.950

943 Why can't I use switch statement on a String? 2008-12-03T18:23:57.127

929 How to create a generic array in Java? 2009-02-09T17:30:44.417

917 How can I generate an MD5 hash? 2009-01-06T09:45:12.130

883 Failed to load the JNI shared Library (JDK) 2011-09-08T18:02:15.777

881 Including all the jars in a directory within the Java classpath 2008-10-20T19:32:45.740

881 Get current stack trace in Java 2009-07-01T13:13:01.657

871 How can I pad an integer with zeros on the left? 2009-01-23T15:21:24.670

865 What does 'synchronized' mean? 2009-07-06T06:47:23.960

858 Can't start Eclipse - Java was started but returned exit code=13 2012-07-12T22:23:31.640

854 How to add local jar files to a Maven project? 2011-02-10T10:03:26.430

853 Why doesn't RecyclerView have onItemClickListener()? 2014-07-22T10:43:39.813

850 Difference between HashMap, LinkedHashMap and TreeMap 2010-05-22T21:10:15.773

840 Converting 'ArrayList<String> to 'String[]' in Java 2010-10-28T11:30:53.847

835 Reading a plain text file in Java 2011-01-17T18:29:13.063

829 Getting the Current Working Directory in Java 2011-02-02T05:24:06.673

824 How to parse JSON in Java 2010-04-07T09:00:21.753

809 StringBuilder vs String concatenation in toString() in Java 2009-10-07T15:44:08.690

802 Static Classes In Java 2011-09-20T13:32:42.410

800 Converting array to list in Java 2010-04-09T12:20:20.827

800 :: (double colon) operator in Java 8 2013-11-15T12:46:32.953

795 When and how should I use a ThreadLocal variable? 2009-05-03T19:59:20.760

792 Which @NotNull Java annotation should I use? 2011-02-10T22:05:35.463

789 Access restriction on class due to restriction on required library rt.jar? 2009-05-13T20:16:26.963

785 How to directly initialize a HashMap (in a literal way)? 2011-07-23T18:40:33.140

784 A 'for' loop to iterate over an enum in Java 2009-07-09T16:24:03.107

782 What is the difference between canonical name, simple name and class name in Java Class? 2013-03-04T13:45:28.763

760 What are the Xms and Xmx parameters when starting JVMs? 2013-02-07T23:28:20.607

759 Java string to date conversion 2010-11-18T15:53:01.240

757 What is the Java equivalent for LINQ? 2009-08-01T18:53:26.813

756 How to make mock to void methods with mockito 2010-02-16T20:54:39.500

754 What is the difference between JSF, Servlet and JSP? 2010-01-19T17:15:41.960