Trending questions in Java

+1 vote
2 answers

What is an Object?

Hey @preetiagarwal, your description is an answer ...READ MORE

Dec 24, 2018 in Java by Priyaj
• 58,100 points
1,209 views
0 votes
2 answers

How do we convert JSON to Map in Java

When you don't know structure of json. ...READ MORE

Oct 31, 2018 in Java by Sushmita
• 6,920 points
5,877 views
0 votes
1 answer

How to create a temporary directory/folder in java?

If you are using JDK 7 use ...READ MORE

Aug 28, 2018 in Java by Frankie
• 9,830 points
6,277 views
0 votes
1 answer

What is the maximum Java heap size of a 32-bit JVM on a 64-bit OS?

32-bit JVMs which expect to have a ...READ MORE

Nov 15, 2018 in Java by Frankie
• 9,830 points
2,818 views
0 votes
1 answer

Is there any difference between ConcurrentHashMap and Collections.synchronizedMap?

ConcurrentHashMap: It allows concurrent modification of the ...READ MORE

Dec 26, 2018 in Java by Sushmita
• 6,920 points
1,060 views
0 votes
1 answer

Comparing Functions in Java

I would suggest that Version 1 is ...READ MORE

Jan 9, 2019 in Java by developer_1
• 3,350 points
440 views
0 votes
2 answers

what is the best way to convert an ArrayList to a String

You could probably use the Joiner class ...READ MORE

Aug 19, 2019 in Java by Sirajul
• 59,230 points
1,156 views
0 votes
1 answer

Why Java String class is declared as final?

String class is made final in Java ...READ MORE

Aug 22, 2018 in Java by code.reaper12
• 3,500 points
6,429 views
0 votes
1 answer

No appenders could be found for logger(log4j)?

Just to get you going you have ...READ MORE

Jun 29, 2018 in Java by Akrati
• 3,190 points
8,604 views
0 votes
1 answer

What causes java.lang.reflect.InvocationTargetException

The exception is thrown if InvocationTargetException - if ...READ MORE

Jun 20, 2018 in Java by Rishabh
• 3,620 points
8,959 views
0 votes
1 answer

Best XML parser for Java

If speed and memory is no problem, dom4j is ...READ MORE

Jul 21, 2018 in Java by samarth295
• 2,220 points
7,541 views
0 votes
1 answer

Understanding Spring @Autowired usage

TL;DR The @Autowired annotation spares you the need ...READ MORE

Nov 30, 2018 in Java by Sushmita
• 6,920 points
1,793 views
+1 vote
1 answer

What are REST clients for Java?

These are the few options : Apache CXF has ...READ MORE

Nov 22, 2018 in Java by Frankie
• 9,830 points
2,117 views
0 votes
1 answer

Why doesn't RecyclerView have onItemClickListener()?

I like this way and I'm using ...READ MORE

Dec 21, 2018 in Java by Daisy
• 8,140 points
867 views
0 votes
1 answer

Describe Heavy Weight Components Mean In Java Programming?

Heavy weight components like Abstract Window Toolkit ...READ MORE

Nov 28, 2018 in Java by Frankie
• 9,830 points
1,809 views
0 votes
1 answer

Types of transaction management in Spring Framework

Well there are basically to types of ...READ MORE

Nov 28, 2018 in Java by geek.erkami
• 2,680 points
1,835 views
0 votes
1 answer

What is the differnece between public static void main string args[] and psvm string []args ?

Before getting to this you should understand ...READ MORE

Nov 20, 2018 in Java by Nabarupa
2,119 views
+2 votes
1 answer

How do I ask the Selenium-WebDriver to wait for few seconds in Java?

There are two ways to wait: explicit ...READ MORE

Dec 19, 2018 in Java by Daisy
• 8,140 points

edited Dec 19, 2018 by Daisy 797 views
0 votes
1 answer

Setting $PATH as used by applications in OS X

That's correct; it's in the plist file ~/.MacOSX/environment.plist It ...READ MORE

Dec 17, 2018 in Java by nirvana
• 3,130 points
929 views
0 votes
1 answer

Java and SQLite

The wikipedia lists some more wrappers: A good tutorial ...READ MORE

Dec 21, 2018 in Java by Daisy
• 8,140 points
718 views
0 votes
1 answer

What is blank final variable?

A final variable in Java can be ...READ MORE

Nov 29, 2018 in Java by Frankie
• 9,830 points
1,668 views
0 votes
1 answer

Fetching screen resolution using Java

You can fetch the screen resolution using the Toolkit.getScreenSize() method ...READ MORE

Sep 20, 2018 in Java by anto.trigg4
• 3,440 points
4,656 views
0 votes
1 answer

JSON parsing in Java using Gson

Well, you can easily do that by ...READ MORE

Nov 22, 2018 in Java by code.reaper12
• 3,500 points
1,895 views
0 votes
1 answer

Getting A File's Mime Type In Java

In Java 7 you can now just ...READ MORE

Dec 14, 2018 in Java by Daisy
• 8,140 points
903 views
0 votes
1 answer

How to encode the HTTP URL address in Java?

Use one of the constructors with more ...READ MORE

Oct 23, 2018 in Java by Sushmita
• 6,920 points
3,139 views
0 votes
1 answer

Android Studio installation on Windows 7 fails, no JDK found

Adding a system variable JDK_HOME with value ...READ MORE

Dec 13, 2018 in Java by Daisy
• 8,140 points
940 views
0 votes
1 answer

Java 8 List<V> into Map<K, V>

Based on Collectors documentation it's as simple as: Map<String, Choice> result ...READ MORE

Nov 29, 2018 in Java by Daisy
• 8,140 points
1,502 views
+4 votes
1 answer

How to print the individual occurance of elements in Java?

You can use a HashMap to serve ...READ MORE

Dec 4, 2018 in Java by Priyaj
• 58,100 points
1,102 views
0 votes
1 answer

Sending POST data in Android

public class CallAPI extends AsyncTask<String, String, String> ...READ MORE

Nov 28, 2018 in Java by Sushmita
• 6,920 points
1,489 views
0 votes
1 answer

Ignoring new fields on JSON objects using Jackson

Jackson provides an annotation that can be ...READ MORE

Oct 25, 2018 in Java by Daisy
• 8,140 points
2,867 views
0 votes
1 answer

Reason for java.lang.IncompatibleClassChangeError

Well these kinda error generally occur when ...READ MORE

Nov 14, 2018 in Java by code.reaper12
• 3,500 points
1,994 views
0 votes
3 answers

Does Java support Default Parameters?

You can try this with method overloading. void ...READ MORE

Sep 21, 2018 in Java by Sushmita
• 6,920 points
6,845 views
0 votes
1 answer

How to count the number of occurrences of an element in a List?

We can use the static frequency() method. int ...READ MORE

Aug 21, 2018 in Java by sharth
• 3,370 points
5,592 views
0 votes
1 answer

Getting a File's MD5 Checksum in Java

There's an input stream decorator, java.security.DigestInputStream, so that ...READ MORE

Nov 30, 2018 in Java by Daisy
• 8,140 points
1,214 views
0 votes
1 answer

Can anyone show how to implement SortByValue in Tree Map for Java ?

You can't have the TreeMap itself sort on the ...READ MORE

Dec 10, 2018 in Java by Sushmita
• 6,920 points

edited Dec 10, 2018 by Sushmita 703 views
+1 vote
1 answer

How to find even or odd using call by value?

Call by value is, when a primitive ...READ MORE

Nov 23, 2018 in Java by Namitha
1,355 views
0 votes
2 answers

How can we Split Java String by New Line?

If you don’t want empty lines: String.split("[\\r\\n]+") READ MORE

Aug 22, 2018 in Java by Daisy
• 8,140 points
7,039 views
0 votes
1 answer

How is the array's address stored in memory?

In terms of memory, you have continuous blocks ...READ MORE

Nov 23, 2018 in Java by Namitha
1,390 views
0 votes
2 answers

How can I get current time in YYYY:MM:DD HH:MI:Sec:Millisecond format in Java?

public String getCurrentTimeStamp() { ...READ MORE

Sep 21, 2018 in Java by Parth
• 4,640 points
7,240 views
0 votes
1 answer

What is object cloning in Java?

Object cloning means to create an exact ...READ MORE

Nov 29, 2018 in Java by Frankie
• 9,830 points
1,032 views
+1 vote
1 answer

How to print factorial of a number using While loop?

While also works like for just you ...READ MORE

Nov 22, 2018 in Java by Namitha
1,276 views
+1 vote
1 answer

Maximum memory usage for JVM

I guess, you can try using the ...READ MORE

Nov 14, 2018 in Java by 93.lynn
• 1,600 points
1,585 views
0 votes
1 answer

How to handle infinite loop in Java?

You can simply add a increment statement ...READ MORE

Nov 22, 2018 in Java by Anoop
1,125 views
0 votes
1 answer

Generate 10 fibonacci numbers.

The placement of logic is wrong that ...READ MORE

Nov 21, 2018 in Java by Nabarupa
1,126 views
0 votes
2 answers

Is there a SortedList in Java?

Since all lists are already "sorted" by ...READ MORE

Nov 2, 2018 in Java by Sushmita
• 6,920 points
4,408 views
0 votes
1 answer

Play MP3 files usng Java API

I don't believe the java AudioStream class ...READ MORE

May 10, 2018 in Java by Rishabh
• 3,620 points
9,407 views
0 votes
1 answer

How to tell Jackson to ignore a field during serialization if its value is null?

To suppress serializing properties with null values ...READ MORE

Jul 4, 2018 in Java by Rishabh
• 3,620 points
7,006 views
0 votes
1 answer

Creating an instance using the class name and calling constructor

Yes: Class<?> clazz = Class.forName(className); Constructor<?> ctor = clazz.getConstructor(String.class); Object ...READ MORE

Oct 9, 2018 in Java by Daisy
• 8,140 points
2,795 views
0 votes
2 answers

Performing HTTP POST operation in JAVA

I'm using JSON-Java to build my JSON object: JSONObject json ...READ MORE

Nov 26, 2018 in Java by Sushmita
• 6,920 points
4,513 views
0 votes
1 answer

Java Timer vs Executor Service

According to Java Concurrency in Practice: Timer is ...READ MORE

Jul 26, 2018 in Java by code.reaper12
• 3,500 points
5,983 views