Latest questions in Java

+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
• 57,450 points
131 views
0 votes
1 answer

Where is JAVA_HOME on macOS Mojave (10.14) to Lion (10.7)?

export JAVA_HOME="$(/usr/libexec/java_home -v 1.6)" or export JAVA_HOME="$(/usr/libexec/java_home -v 1.7)" or export ...READ MORE

Dec 4, 2018 in Java by Daisy
• 8,080 points
1,184 views
0 votes
1 answer

Sending Email in Android using JavaMail API without using the default/built-in app

Send e-mail in Android using the JavaMail ...READ MORE

Dec 4, 2018 in Java by Daisy
• 8,080 points
769 views
0 votes
1 answer

How can you catch an exception thrown by another thread in Java?

This can be done using Thread.UncaughtExceptionHandler. Here’s a simple ...READ MORE

Dec 3, 2018 in Java by Frankie
• 9,810 points
3,042 views
0 votes
1 answer

Which of them among ArrayList, LinkedList, and Vector is most efficient for adding and removing elements from the list?

Of the three, LinkedList is generally going to give ...READ MORE

Dec 3, 2018 in Java by Frankie
• 9,810 points
216 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,880 points
455 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,080 points
114 views
0 votes
1 answer

HttpServletRequest get JSON POST data

Normally you can GET and POST parameters ...READ MORE

Nov 29, 2018 in Java by Sushmita
• 6,880 points
14,808 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,080 points
288 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,810 points
150 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,810 points
60 views
0 votes
1 answer

If The A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed In Java Programming?

A class that is declared without any ...READ MORE

Nov 28, 2018 in Java by Frankie
• 9,810 points
61 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,810 points
73 views
0 votes
1 answer

Java Client Certificate over HTTPS/SSL

The missing links was (mostly) the first ...READ MORE

Nov 28, 2018 in Java by Sushmita
• 6,880 points
335 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,880 points
98 views
0 votes
1 answer

Types of transaction management in Spring Framework

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

Nov 27, 2018 in Java by geek.erkami
• 2,660 points
339 views
0 votes
1 answer

@Component vs @Controller vs @Repository vs @Service annotations in Spring Framework

@Component: This marks a java class as a bean. ...READ MORE

Nov 27, 2018 in Java by code.reaper12
• 3,470 points
1,209 views
0 votes
1 answer

web.xml file is missing in my eclipse IDE

Very simple. You will find Deployment Descriptor ...READ MORE

Nov 27, 2018 in Java by Omkar
• 68,840 points
225 views
0 votes
1 answer

Unable to find valid certification path to requested target - error even after cert imported

Unfortunately - it could be many things ...READ MORE

Nov 27, 2018 in Java by Daisy
• 8,080 points
1,622 views
0 votes
1 answer

Converting ISO 8601-compliant String to java.util.Date

Unfortunately, the time zone formats available to SimpleDateFormat (Java ...READ MORE

Nov 27, 2018 in Java by Daisy
• 8,080 points
1,686 views
0 votes
1 answer

Factorial of a number using while loop

import java.util.*; public class WhileFactorial { ...READ MORE

Nov 23, 2018 in Java by Namitha
346 views
0 votes
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
121 views
0 votes
1 answer

ArrayIndexOutOfBoundsException in Java

The index of array starts from 0. public ...READ MORE

Nov 23, 2018 in Java by Namitha
37 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 22, 2018 in Java by Namitha
84 views
0 votes
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
70 views
+2 votes
2 answers

Using while loop i want to print 10 even numbers

public class Loops { ...READ MORE

Dec 4, 2019 in Java by One of the Simplest ways to answer you q
6,608 views
+1 vote
1 answer

What are REST clients for Java?

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

Nov 21, 2018 in Java by Frankie
• 9,810 points
104 views
0 votes
2 answers

In Java, what is the best way to determine the size of an object?

I happened to find a java class "jdk.nashorn.internal.ir.debug.ObjectSizeCalculator", ...READ MORE

Aug 19, 2019 in Java by Sirajul
• 44,350 points
364 views
+1 vote
1 answer

3 dot in parameter in Java

The "Three Dots" in java is called ...READ MORE

Nov 21, 2018 in Java by geek.erkami
• 2,660 points
6,846 views
0 votes
1 answer

JSON parsing in Java using Gson

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

Nov 21, 2018 in Java by code.reaper12
• 3,470 points
604 views
0 votes
1 answer

How to handle infinite loop in Java?

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

Nov 21, 2018 in Java by Anoop
128 views
0 votes
1 answer

Running Java program without main method.

This would have worked fine till Java ...READ MORE

Nov 21, 2018 in Java by Anoop
41 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
60 views
+1 vote
1 answer

Error: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2

Hello @Jino, It is just a JVM bug ...READ MORE

Nov 21, 2018 in Java by Nabarupa
1,346 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
475 views
0 votes
1 answer

Concern and cross-cutting concern in Spring AOP

The concern is the behavior we want ...READ MORE

Nov 15, 2018 in Java by code.reaper12
• 3,470 points
2,376 views
0 votes
1 answer

Serializing a lambda

With the release of Java 8, Oracle introduced the ...READ MORE

Nov 15, 2018 in Java by code.reaper12
• 3,470 points
114 views
0 votes
1 answer

Which is the standard concise way to copy a file in Java?

As toolkit mentions above, Apache Commons IO ...READ MORE

Nov 15, 2018 in Java by Frankie
• 9,810 points
37 views
0 votes
1 answer

How to force garbage collection in Java?

Your best option is to call System.gc() which simply ...READ MORE

Nov 15, 2018 in Java by Frankie
• 9,810 points
114 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,810 points
709 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,810 points
125 views
0 votes
1 answer

Reason for java.lang.IncompatibleClassChangeError

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

Nov 13, 2018 in Java by code.reaper12
• 3,470 points
154 views
+1 vote
1 answer

Maximum memory usage for JVM

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

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

What is Enum in Java?

 It means that the type argument for ...READ MORE

Nov 13, 2018 in Java by Frankie
• 9,810 points
78 views
0 votes
1 answer

How to call a method from Constructor?

Have a glance at below steps: You create ...READ MORE

Nov 13, 2018 in Java by Frankie
• 9,810 points
46 views
0 votes
1 answer

Why clone() method is protected in Java?

The clone() is protected because it is ...READ MORE

Nov 12, 2018 in Java by geek.erkami
• 2,660 points
705 views
0 votes
1 answer

Deep copying a 2d array in Java

I guess, for deep copying you will ...READ MORE

Nov 12, 2018 in Java by code.reaper12
• 3,470 points
787 views
0 votes
1 answer

3DES encryption/decryption in Java

Hey, its just that Base 64 encoding ...READ MORE

Nov 8, 2018 in Java by nirvana
• 3,060 points
2,734 views
0 votes
2 answers

How to move or copy a file in Java

The new JAVA Specification Request 203 -NIO will ...READ MORE

Aug 20, 2019 in Java by Sirajul
• 44,350 points
52 views
0 votes
1 answer

HTML Parsing in Java

Well, to parse HTML I used JTidy.  Basically, ...READ MORE

Nov 2, 2018 in Java by geek.erkami
• 2,660 points
35 views