Trending questions in Java

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
1,388 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,020 points
1,614 views
0 votes
1 answer

Java version mismatch

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

Feb 21, 2019 in Java by Vaishnavi
2,176 views
0 votes
1 answer

How can we run eclipse in clean mode? and what will happen if we do so?

if set to "true", any cached data ...READ MORE

Jan 11, 2019 in Java by Daisy
• 8,140 points
3,885 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,740 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
1,271 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,350 points
1,672 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
1,238 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
1,115 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,683 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
1,186 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,350 points
2,511 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,350 points
2,282 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,745 views
0 votes
2 answers

Setting Proxy for JVM usage

JVM uses the proxy to make HTTP ...READ MORE

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

Http Basic Authentication in Java using HttpClient?

String encoding = Base64Encoder.encode ("test1:test1"); HttpPost httppost = ...READ MORE

Dec 20, 2018 in Java by Daisy
• 8,140 points
4,479 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,377 views
0 votes
1 answer

SuppressWarnings (“unchecked”) in Java

@SuppressWarnings("unchecked") is used when Java generics just don't ...READ MORE

Sep 4, 2018 in Java by anto.trigg4
• 3,440 points
9,065 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
1,188 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,020 points
1,106 views
0 votes
2 answers

How do I convert an input stream into a byte array

You could probably try this if you ...READ MORE

Aug 29, 2019 in Java by Sirajul
• 59,230 points
4,064 views
+1 vote
1 answer

Convert CSV to JSON. JSON payload should be included in square brackets

The JSON payload uses a list and ...READ MORE

Aug 7, 2018 in Java by Omkar
• 69,220 points
10,226 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
1,327 views
0 votes
2 answers

How to convert byte array to String and STring to byte array?

The best possible way of conversion between byte[] and String is to ...READ MORE

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

Getting "Unsupported major.minor version" error.

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

Feb 22, 2019 in Java by Sapan
1,606 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,350 points
1,003 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
740 views
0 votes
1 answer

How to run Unix shell script from Java code?

ProcessBuilder pb = new ProcessBuilder("myshellScript.sh", "myArg1", "myArg2"); ...READ MORE

Oct 26, 2018 in Java by Daisy
• 8,140 points
6,608 views
0 votes
1 answer

What is the difference between Polymorphism, Overriding and Overloading?

As far as I know, the main ...READ MORE

Jun 19, 2018 in Java by scarlett
• 1,290 points
12,169 views
0 votes
1 answer

How to disable session in JSP?

<%@ page session=“false” %>    Using this above command, you can ...READ MORE

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

How to Read/Write String from a File in Android

Writing a File in android: private void writeToFile(String ...READ MORE

Oct 3, 2018 in Java by sharth
• 3,370 points
7,523 views
0 votes
1 answer

What is the need to override the equals and hashCode methods in Java?

You must override hashCode() in every class ...READ MORE

Jan 2, 2019 in Java by Daisy
• 8,140 points
3,574 views
0 votes
1 answer

Xpath in Java for accessing OWL Document

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

Feb 28, 2019 in Java by developer_1
• 3,350 points
1,117 views
0 votes
1 answer

Need help with Java Installation

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

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

Trusting all certificates using HttpClient over HTTPS

Note: Do not implement this in production ...READ MORE

Jun 25, 2018 in Java by Rishabh
• 3,620 points
11,797 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,140 points
5,062 views
0 votes
1 answer

Arrays are passed by value or passed by reference in Java?

Arrays are not a primitive type in ...READ MORE

Jul 18, 2018 in Java by sophia
• 1,400 points
10,745 views
0 votes
2 answers

How can I convert byte array into hex string in Java?

public static String byteArrayToHex(byte[] a) { ...READ MORE

Aug 29, 2019 in Java by Sirajul
• 59,230 points
3,091 views
0 votes
1 answer

Under what conditions is a JSESSIONID created?

JSESSIONID cookie is created/sent when session is ...READ MORE

Dec 18, 2018 in Java by Daisy
• 8,140 points
4,097 views
0 votes
1 answer

What is composition in Java?

Composition is again specialized form of Aggregation ...READ MORE

Feb 18, 2019 in Java by Neha
• 6,300 points

edited Feb 18, 2019 by Neha 1,400 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,020 points
585 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,020 points
729 views
0 votes
2 answers

What is the use of @Override annotation in Java ? When do we use it ?

@Override annotation is used when we override ...READ MORE

Aug 14, 2019 in Java by Sirajul
• 59,230 points
3,656 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,020 points
540 views
0 votes
2 answers

What is the easiest way to iterate through the characters of a string in Java?

There are two approaches to this: for(int i ...READ MORE

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

Architecture mismatch between driver and application

None of these did it for me. ...READ MORE

Feb 6, 2019 in Java by developer_1
• 3,350 points
1,733 views
0 votes
1 answer

Getting error 404 not found when trying to download JDK

Try this command, it should work: wget --no-check-certificate ...READ MORE

Dec 26, 2018 in Java by Omkar
• 69,220 points
3,539 views
0 votes
2 answers

Why are you not able to declare a class as static in Java?

A static keyword  can be used with ...READ MORE

Jun 11, 2019 in Java by Neha
• 330 points
1,651 views
0 votes
1 answer

Mathematical Operations in Java

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

Feb 28, 2019 in Java by developer_1
• 3,350 points
739 views