Most voted questions in Java

+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,370 points
2,491 views
+15 votes
18 answers

How can I convert String to JSON object in Java?

Hi @Daisy You can use Google gson  for more ...READ MORE

Feb 7, 2019 in Java by Suresh
• 700 points
103,641 views
+12 votes
3 answers

How do I set or change the PATH system variable?

First make sure you have installed JDK ...READ MORE

Aug 28, 2018 in Java by slayer
• 29,260 points
127 views
+9 votes
12 answers

Unable to resolve this error: "javac is not recognized as an internal or external command"

Check your javac path on Windows using Windows Explorer C:\Program Files\Java\jdk1.7.0_02\bin and ...READ MORE

May 23, 2018 in Java by Rishabh
• 3,540 points
56,902 views
+8 votes
11 answers

Default parameters of XMS and XMX in JVM

You use these Java command-line parameters to ...READ MORE

Nov 13, 2018 in Java by Murali
148,318 views
+5 votes
3 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

Mar 27, 2018 in Java by DragonLord999
• 8,400 points

edited Nov 6, 2018 by Omkar 12,734 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
• 57,450 points
133 views
+4 votes
3 answers

What are the steps to set Java_home on Windows?

Set Java Home JAVA_HOME = C:\Program Files\Java\jdk1.7.0 [Location ...READ MORE

Sep 18, 2018 in Java by Sushmita
• 6,880 points
159 views
+2 votes
1 answer

please someone tell the code to launch an instance in digital ocean using java

In order to create a digital ocean ...READ MORE

5 days ago in Java by Sirajul
• 44,350 points
35 views
+2 votes
0 answers

How to add external Jar in modular JavaFX 11 project correctly?

I'm using Java 11 and JavaFX 11. ...READ MORE

Aug 8, 2019 in Java by invzbl3
541 views
+2 votes
1 answer

Javac command not working in my windows 10

Check your javac path on Windows using Windows Explorer C:\Program Files\Java\jdk1.7.0_02\bin and ...READ MORE

Aug 6, 2019 in Java by Sirajul
• 44,350 points
3,288 views
+2 votes
0 answers

How to pass dynamic JSON request with parameter in POST request using Rest assured java?

I am currently testing an API which ...READ MORE

Jun 25, 2019 in Java by avishek
• 140 points
3,117 views
+2 votes
1 answer

How to import an existing x509 certificate and private key in Java keystore to use in SSL?

keytool does not provide such basic functionality ...READ MORE

Dec 19, 2018 in Java by Daisy
• 8,080 points
448 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,080 points

edited Dec 19, 2018 by Daisy 78 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,641 views
+2 votes
1 answer

What is the meaning of "this" keyword in Java?

public class MyThisTest { private int ...READ MORE

Oct 10, 2018 in Java by Daisy
• 8,080 points
67 views
+2 votes
12 answers

“A Non-static method cannot be referenced from a static context” error

this method must be static so that it will exist even though the ...READ MORE

Jun 11, 2019 in Java by Neha
• 330 points
70,048 views
+2 votes
10 answers

Unable to execute jar- file: “no main manifest attribute”

add a jar/manifest/attributes setting like this: apply plugin: ...READ MORE

Nov 27, 2018 in Java by krishti
36,314 views
+2 votes
3 answers

Listing all the subclasses of a specific class in Java

Try with BurningWave core library. Here an ...READ MORE

Dec 29, 2019 in Java by anonymous
• 300 points

edited Jan 9 by anonymous 736 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
4,010 views
+2 votes
10 answers

How to import a jar file in Eclipse?

To import jar file in your Eclipse ...READ MORE

May 15, 2018 in Java by sharth
• 3,370 points
86,751 views
+1 vote
1 answer

Program for nth prime number without using scanner

Hi @Sneha, you could use something like ...READ MORE

6 days ago in Java by Kalgi
• 49,340 points
33 views
+1 vote
0 answers

I am getting below error "The method readerFor(Class<Map>) is undefined for the type CsvMapper"

I Have requirement to convert csv to ...READ MORE

Dec 29, 2019 in Java by anonymous
• 160 points
94 views
+1 vote
0 answers

getting below error when trying to conver csv file to json :The method readerFor(Class<Map>) is undefined for the type CsvMapper [closed]

PFB source code: import java.io.File; import java.lang.*; import java.util.Arrays; import java.util.List; import ...READ MORE

Dec 28, 2019 in Java by anonymous
• 160 points

closed 5 days ago by Kalgi 81 views
+1 vote
1 answer

Is Java a compiled language or interpreted?

Compiled languages are directly converted into machine ...READ MORE

Dec 18, 2019 in Java by Hannah
• 17,330 points
116 views
+1 vote
1 answer

how to print this statement in java print(' '*(r-x-1)+'*'*(2*x+1)) ( logic used in python .its perfect) but java wrong output came

In ' '*(r-x-1) and '*'*(2*x+1), you used multiplication ...READ MORE

Dec 21, 2019 in Java by Utsab Bandyopadhyay
170 views
+1 vote
0 answers

output occurs but invisible immediately how to rectify this ?

public class evenodd { public static void main(String[] ...READ MORE

Oct 17, 2019 in Java by BIPLAB
• 130 points
165 views
+1 vote
1 answer

Adding Jar file to project

Changing the JRE System Library might work.  Right-click ...READ MORE

Sep 4, 2019 in Java by Esha
111 views
+1 vote
1 answer

Java: Nested Methods

JAVA does not support “directly” nested methods, but you ...READ MORE

Aug 20, 2019 in Java by Sirajul
• 44,350 points
493 views
+1 vote
0 answers

Initially autowired object has value,it becomes null after paging(using JSF 2.2 and spring 4.01.)

i'm trying to create basic crud operations ...READ MORE

Jul 5, 2019 in Java by swats
127 views
+1 vote
1 answer

Can you please explain the difference between string, string buffer and string builder?

String are immutable where as StringBuffer and ...READ MORE

Jul 4, 2019 in Java by Akash
• 160 points
154 views
+1 vote
0 answers

How to install java on linux operating system? [closed]

I read good info about java here ...READ MORE

May 16, 2019 in Java by Vicky

closed May 16, 2019 by Vardhan 55 views
+1 vote
1 answer

What are the types of memory in JVM?

The different types of Memory in JVM ...READ MORE

Mar 7, 2019 in Java by Priyaj
• 57,450 points
766 views
+1 vote
2 answers

How to take multiple integer input in one line using BufferedReader in Java?

Try this in case you don't know ...READ MORE

Aug 29, 2019 in Java by Sirajul
• 44,350 points
5,481 views
+1 vote
4 answers

What is difference between access modifier and access specifier in java

Access Specifier:- This can be understood as ...READ MORE

Feb 14, 2019 in Java by Priyaj
• 57,450 points
8,974 views
+1 vote
2 answers

What is coercion in Polymorphism?

Implicit type conversion is called coercion polymorphism. ...READ MORE

Jun 25, 2019 in Java by anonymous
261 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,880 points
128 views
+1 vote
2 answers

What is an Object?

Hey @preetiagarwal, your description is an answer ...READ MORE

Dec 24, 2018 in Java by Priyaj
• 57,450 points
56 views
+1 vote
2 answers

How to use try & catch block in Java?

Hey @Jino, Using try catch block for your ...READ MORE

Dec 21, 2018 in Java by Nabarupa
78 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
105 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,887 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
+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
73 views
+1 vote
1 answer

How do I do a HTTP GET?

If you don't want to use external ...READ MORE

Aug 28, 2018 in Java by Neha
• 6,280 points
35 views
+1 vote
1 answer

What is a simple way to repeat a string in java?

From Java 11 on, there's a method String::repeat that does ...READ MORE

Aug 28, 2018 in Java by Frankie
• 9,810 points
2,027 views
+1 vote
1 answer

How to calculate days between two dates?

You are making some conversions with your ...READ MORE

Aug 28, 2018 in Java by Frankie
• 9,810 points
68 views
+1 vote
1 answer

Setting selected item of Spinner by value rather than by position

Suppose your Spinner is named newSpinner, and it contains ...READ MORE

Aug 10, 2018 in Java by 93.lynn
• 1,600 points
6,231 views