Trending questions in Java

0 votes
1 answer

Autowired field pointing NULL in Spring

The field annotated @Autowired is null because ...READ MORE

Jun 6, 2018 in Java by Avi
• 160 points

edited Mar 4, 2022 by Sarfaraz 14,212 views
0 votes
1 answer

What is integer boxing in java?

In Java the boxing range for any ...READ MORE

Mar 6, 2019 in Java by Avantika
• 1,520 points
2,331 views
0 votes
1 answer

DTO vs VO vs POJO vs JavaBeans

Data Transfer Object is used for transferring a collection ...READ MORE

Aug 14, 2018 in Java by code.reaper12
• 3,500 points

edited Oct 7, 2021 by Sarfaraz 11,111 views
0 votes
1 answer

Received fatal alert: handshake_failure through SSLHandshakeException

On update 51, java 1.8 prohibited[1] RC4 ...READ MORE

Dec 5, 2018 in Java by Daisy
• 8,120 points
6,219 views
0 votes
2 answers

How can we add leading zeros to the number in Java?

From Java 1.5 you can use the String.format method. ...READ MORE

Aug 26, 2019 in Java by Sirajul
• 59,230 points
4,647 views
0 votes
1 answer

What are the advantages of Dynamic Polymorphism?

Advantages of Dynamic Polymorphism Dynamic Polymorphism allows Java ...READ MORE

Feb 1, 2019 in Java by Frankie
• 9,830 points
3,699 views
0 votes
1 answer

How to get rid of TLE in Java?

The TLE (Time limit exceed) problem occurs ...READ MORE

Mar 5, 2019 in Java by Disha
2,198 views
0 votes
1 answer

Interface variable are static and final by default. Why?

Interface variables are static because Java interfaces ...READ MORE

Jul 4, 2018 in Java by Daisy
• 8,120 points
12,661 views
+2 votes
10 answers

Convert Java Byte Array - String - Byte Array

Character Stream Vs Byte Stream Character oriented are ...READ MORE

Sep 25, 2018 in Java by carldivin
• 180 points
9,852 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,910 points
6,254 views
0 votes
1 answer

Find common element between two array.

You just need nested loop, that will ...READ MORE

Mar 11, 2019 in Java by Esha Gupta
1,621 views
0 votes
1 answer

Implementing mouseover() function in Selenium webdriver

This code works perfectly well: Actions builder ...READ MORE

Jan 22, 2019 in Java by developer_1
• 3,320 points
3,606 views
0 votes
2 answers

How can we add the local JAR files to the Maven Project in Java?

Firstly I would like to give credit ...READ MORE

Nov 5, 2018 in Java by Sushmita
• 6,910 points
10,333 views
0 votes
1 answer

“Missing return statement” within if / for / while in Java

Putting a return statement in any of the ...READ MORE

Sep 27, 2018 in Java by code.reaper12
• 3,500 points
8,690 views
0 votes
1 answer

HashMap with multiple values under the same key

Use a map that has a list ...READ MORE

Dec 13, 2018 in Java by Sushmita
• 6,910 points
5,282 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
• 59,230 points
699 views
0 votes
1 answer

Calling remove in foreach loop in Java

To safely remove from a collection while ...READ MORE

Sep 26, 2018 in Java by sharth
• 3,370 points
8,610 views
0 votes
1 answer

Method for escaping HTML in Java

242 StringEscapeUtils from Apache Commons Lang: import static org.apache.commons.lang.StringEscapeUtils.escapeHtml; // ... String source ...READ MORE

Jan 9, 2019 in Java by developer_1
• 3,320 points
4,048 views
0 votes
1 answer

What is an Operand Stack in Java?

The basic utility of Operand Stack are ...READ MORE

Mar 7, 2019 in Java by Priyaj
• 58,090 points
1,587 views
0 votes
1 answer

Create fucntion to find GCD of two numbers

Hey @Diya, here is a code on how ...READ MORE

Mar 28, 2019 in Java by Priyaj
• 58,090 points
652 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,830 points
6,474 views
0 votes
1 answer

Eclipse java debugging: source not found

Eclipse debugging works with the class actually loaded by ...READ MORE

Oct 25, 2018 in Java by Daisy
• 8,120 points
7,286 views
0 votes
1 answer

How to resolve 'Must Override a Superclass Method' Errors after importing a project into Eclipse ?

Eclipse is defaulting to Java 1.5 and ...READ MORE

Jan 10, 2019 in Java by developer_1
• 3,320 points
3,912 views
0 votes
2 answers

Java: convert List<String> to a String

With a java 8 collector, this can ...READ MORE

Aug 30, 2019 in Java by Sirajul
• 59,230 points
562 views
0 votes
0 answers

Iterate over json and output multiple rows

I have a json in which multiple ...READ MORE

Mar 12, 2019 in Java by Yogesh
1,286 views
0 votes
2 answers

Reading an InputStream & coverting it into a String in Java?

Apache Commons allows: String myString = IOUtils.toString(myInputStream, "UTF-8"); And ...READ MORE

Aug 30, 2019 in Java by Karan
• 19,610 points
846 views
0 votes
2 answers

What are all the different ways to create an object in Java?

There are different ways you could do this ...READ MORE

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

Write files to external public storage in Android

MediaStore has not discovered your newly-created files yet. ...READ MORE

Mar 1, 2019 in Java by developer_1
• 3,320 points
1,623 views
0 votes
1 answer

Count occurance of string in an array

You can use hashmap to solve this, ...READ MORE

Mar 7, 2019 in Java by Priyaj
• 58,090 points
1,358 views
0 votes
2 answers

How can we add an image to a JPanel?

If you are using JPanels, then are ...READ MORE

Sep 20, 2018 in Java by Daisy
• 8,120 points
10,961 views
0 votes
2 answers

How to convert a byte into Hexadecimal in Java?

private static final String ...READ MORE

Aug 29, 2019 in Java by Sirajul
• 59,230 points
1,752 views
0 votes
2 answers

Result of character addition in Java

Binary arithmetic operations on char and byte ...READ MORE

Aug 22, 2019 in Java by Sirajul
• 59,230 points
4,092 views
0 votes
1 answer

Install Java on Ubuntu

Hi @Anvi, to install Java on Ubuntu, ...READ MORE

Mar 1, 2019 in Java by Pratibha
• 3,690 points
1,455 views
0 votes
1 answer

How can we compare objects by multiple fields in Java?

You can implement a Comparator which compares two Person objects, and ...READ MORE

Jan 9, 2019 in Java by Daisy
• 8,120 points
3,652 views
0 votes
1 answer

Difference between Instance Variable and Class Variable

A variable defined within a block or ...READ MORE

Mar 12, 2019 in Java by Reema
944 views
0 votes
1 answer

How do I break out of nested loops in Java?

You can use break with a label for the ...READ MORE

Mar 13, 2019 in Java by trisha
903 views
0 votes
1 answer

Merge two array in Java

This is very simple, you need an ...READ MORE

Mar 11, 2019 in Java by Esha Gupta
915 views
+1 vote
1 answer

How can I find memory usage of my application in Android?

You can get memory info programmatically and ...READ MORE

Jan 10, 2019 in Java by Sushmita
• 6,910 points
3,450 views
0 votes
1 answer

Java version mismatch

We get this error when we write ...READ MORE

Feb 21, 2019 in Java by Vaishnavi
1,649 views
0 votes
3 answers

How can I add new elements to an Array in Java

String[] source = new String[] { "a", ...READ MORE

Sep 19, 2018 in Java by Sushmita
• 6,910 points
11,578 views
0 votes
2 answers

String comparission in Java

You should use s1.equals(s2) instead of '==' ...READ MORE

Mar 14, 2019 in Java by anonymous
697 views
0 votes
1 answer

Extend an array after initialization

Here is the method I came up ...READ MORE

Mar 11, 2019 in Java by Esha Gupta
803 views
0 votes
1 answer

FirebaseListAdapter not pushing individual items for chat app

o let the FirebaseRecyclerAdapter and FirebaseListAdapter show ...READ MORE

Feb 14, 2019 in Java by developer_1
• 3,320 points
1,863 views
0 votes
1 answer

First panel added to a frame disappears

The default layout of a JFrame (or more specifically ...READ MORE

Mar 1, 2019 in Java by developer_1
• 3,320 points
1,169 views
0 votes
1 answer

How to build jars from IntelliJ properly?

How to build a jar with IntelliJ ...READ MORE

Oct 12, 2018 in Java by sharth
• 3,370 points
7,166 views
0 votes
2 answers

What is the difference between Type List and type ArrayList in Java

By List, you actually tell, that your object ...READ MORE

Aug 28, 2019 in Java by Sirajul
• 59,230 points
2,261 views
0 votes
1 answer

Concept of Shadowing in Java

Entities (packages, types, methods, variables, etc.) defined ...READ MORE

Feb 8, 2019 in Java by developer_1
• 3,320 points
2,002 views
0 votes
1 answer

What is JNI?

Java native interface, it is an interface ...READ MORE

Mar 7, 2019 in Java by Priyaj
• 58,090 points
838 views
0 votes
2 answers

How to convert a JSON String into Object in Java?

You could probably check out Google's Gson: ...READ MORE

Aug 21, 2019 in Java by Sirajul
• 59,230 points
3,041 views