Trending questions in Java

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
770 views
0 votes
2 answers

How do I read and convert an InputStream object to string type?

You can also use Java Standard Library ...READ MORE

Jul 17, 2018 in Java by Sushmita
• 6,890 points
12,883 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
242 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,070 points
307 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,310 points
2,683 views
0 votes
1 answer

What are the advantages of Dynamic Polymorphism?

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

Jan 31, 2019 in Java by Frankie
• 9,810 points
2,275 views
+28 votes
3 answers

How can we set java.library.path in Eclipse?

Go into the library settings for your ...READ MORE

Jul 3, 2018 in Java by sharth
• 3,350 points
9,596 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,019 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,310 points
916 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 12, 2019 in Java by trisha
429 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,500 points
653 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
374 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
406 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,120 points
586 views
0 votes
1 answer

Multiple return types in Java

No, you don't have two return types.It's ...READ MORE

Feb 8, 2019 in Java by developer_1
• 3,310 points
1,679 views
+1 vote
2 answers

Calculating date/time difference in Java

We can also use java.util.concurrent.TimeUnit class. long diff = d2.getTime() ...READ MORE

Aug 28, 2018 in Java by Sushmita
• 6,890 points
10,195 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
334 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,070 points
951 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
295 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,120 points
480 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
168 views
0 votes
1 answer

Retrieving query from java.sql.PreparedStatement

By using prepared statements, you can't retrieve the query ...READ MORE

Oct 12, 2018 in Java by code.reaper12
• 3,500 points
6,739 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,890 points
3,956 views
0 votes
1 answer

How to remove object from an Array?

Here is a code I came up ...READ MORE

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

Getting "Unsupported major.minor version" error.

I will recommend not to upgrade the ...READ MORE

Feb 21, 2019 in Java by Sapan
836 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,310 points
2,681 views
0 votes
1 answer

FirebaseListAdapter not pushing individual items for chat app

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

Feb 13, 2019 in Java by developer_1
• 3,310 points
1,139 views
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
12,012 views
0 votes
1 answer

What are the different ways of comparing Strings in Java?

The different ways of comparing string in ...READ MORE

Mar 5, 2019 in Java by Wasim
247 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,120 points
153 views
0 votes
1 answer

finalize() called on strongly reachable object in Java 8

A bit of conjecture here. It is ...READ MORE

Mar 5, 2019 in Java by developer_1
• 3,310 points
192 views
0 votes
1 answer

How to break a number to individual digit?

The best way would be find the ...READ MORE

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

Compiling error in Java

Generally the file name and the class ...READ MORE

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

How to install and configure JDK8 on Windows 10

Hey @Henna, Go to this page  Accept the license ...READ MORE

Feb 28, 2019 in Java by Kalgi
370 views
0 votes
1 answer

Java version mismatch

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

Feb 21, 2019 in Java by Vaishnavi
629 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,310 points
246 views
0 votes
1 answer

Which is faster amongst an Array and an ArrayList?

Array Over List: The capacity of an Array is fixed.  Whereas ArrayList can ...READ MORE

Jul 20, 2018 in Java by sophia
• 1,400 points
9,926 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,500 points
4,933 views
0 votes
1 answer

Rotate elements of array by n position

Here is what I came up with,  import ...READ MORE

Mar 3, 2019 in Java by Priyaj
• 58,120 points
122 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,110 points
3,918 views
0 votes
1 answer

Xpath in Java for accessing OWL Document

Don't query RDF (or OWL) with XPath In ...READ MORE

Feb 27, 2019 in Java by developer_1
• 3,310 points
227 views
0 votes
1 answer

How to use nested class in Java?

This program will help you understand the ...READ MORE

Mar 3, 2019 in Java by Priyaj
• 58,120 points
87 views
0 votes
1 answer

Types of IOC containers in Spring Framework

There are basically two types of IOC ...READ MORE

Aug 27, 2018 in Java by misc.edu04
• 1,440 points
8,154 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,070 points
2,288 views
0 votes
1 answer

Need help with Java Installation

Hi @Ashmita, to asnwer your question, lets ...READ MORE

Feb 27, 2019 in Java by Pratibha
• 3,690 points
185 views
0 votes
1 answer

Mathematical Operations in Java

Ok. This is happening because you're dividing ...READ MORE

Feb 27, 2019 in Java by developer_1
• 3,310 points
123 views
0 votes
1 answer

Access method without creating Object

This is not possible in java. You ...READ MORE

Feb 7, 2019 in Java by Dheeraj
1,007 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,310 points
933 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,070 points
1,930 views