Trending questions in Java

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,686 views
0 votes
1 answer

Spring configuration file

A Spring configuration file is an XML ...READ MORE

Aug 28, 2018 in Java by v.liyyah
• 1,300 points
6,133 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,910 points
911 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,101 views
0 votes
2 answers

Exception found while using Thread.sleep() and wait() in Java

A simpler way to wait is to ...READ MORE

Aug 13, 2018 in Java by samarth295
• 2,220 points
8,742 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
958 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,910 points
5,482 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,120 points
784 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,747 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,320 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,910 points
1,631 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
1,933 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,690 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
1,952 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,120 points
609 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,240 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,120 points

edited Dec 19, 2018 by Daisy 599 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,576 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,792 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
671 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,445 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,120 points
807 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,120 points
1,377 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,120 points
698 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,327 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,910 points
1,348 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,910 points
2,890 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,090 points
906 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
5,437 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,805 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,120 points
1,073 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,120 points
2,591 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,910 points
6,595 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,910 points

edited Dec 10, 2018 by Sushmita 552 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,223 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,321 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,215 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,120 points
6,820 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
883 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,129 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,425 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,016 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,630 points
6,802 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
978 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,260 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
6,837 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,910 points
4,171 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,120 points
2,634 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,910 points
4,261 views
0 votes
1 answer

How to change selection listener in JComboBox?

It should respond to ActionListeners, like this: combo.addActionListener (new ...READ MORE

Nov 15, 2018 in Java by Frankie
• 9,830 points
879 views