Trending questions in Java

+7 votes
16 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,620 points
459,415 views
+10 votes
13 answers

Default parameters of XMS and XMX in JVM

Run this code to see all the ...READ MORE

Nov 13, 2018 in Java by anonymous
398,972 views
+1 vote
2 answers

How to find all the classes of a package in Java?

Looking on internet I found this page with ...READ MORE

Nov 16, 2020 in Java by Juan
• 330 points
347,807 views
+4 votes
11 answers

How to import a jar file in Eclipse?

Click on File > Import. The Import ...READ MORE

Aug 23, 2018 in Java by Daisy
• 8,120 points
354,956 views
+16 votes
25 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
• 720 points
251,389 views
+1 vote
13 answers

How does java.net.SocketException: Connection reset happen ?

You can use wireshark to view the ...READ MORE

Dec 7, 2018 in Java by tushh
250,750 views
+2 votes
14 answers

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

Hey Techies, Non-static variables are part of the objects ...READ MORE

Dec 10, 2020 in Java by Roshni
• 10,520 points
248,762 views
+2 votes
14 answers

Communications link failure: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

Your exception seems to indicate that your ...READ MORE

Dec 11, 2020 in Java by Roshni
• 10,520 points
243,378 views
+2 votes
13 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
214,945 views
0 votes
6 answers

How can I separate the digits of an int number in Java?

You can also have a look here: To ...READ MORE

Dec 9, 2020 in Java by Roshni
• 10,520 points
205,253 views
0 votes
13 answers

What is the correct way to add external Jars to IntelliJ IDEA Project?

Adding custom JAR files to the EAR project Copy the custom JAR to the ...READ MORE

Dec 10, 2020 in Java by Nikita
186,259 views
0 votes
1 answer

Error creating bean with name 'entityManagerFactory' defined in class path resource : Invocation of init method failed

To solve your ERROR, I would suggest ...READ MORE

Feb 18, 2022 in Java by Aditya
• 7,680 points
129,265 views
0 votes
4 answers

How can we display an output of float data with 2 decimal places in java? Please help

You can use DecimalFormat. One way to use ...READ MORE

Dec 16, 2020 in Java by Gitika
• 65,910 points
162,006 views
+1 vote
13 answers

How to send HTTP POST requests on Java?

With Apache HttpClient In the old days, this Apache ...READ MORE

Dec 10, 2020 in Java by Rajiv
• 8,910 points
157,931 views
+1 vote
5 answers

How to take input using BufferedReader in Java?

yupp i am explaining every thing .. We ...READ MORE

Feb 1, 2020 in Java by Rohan
• 180 points
119,307 views
+1 vote
12 answers

Iterate over a JSONObject?

Assuming your JSON object is saved in ...READ MORE

Dec 11, 2020 in Java by Rajiv
• 8,910 points
123,161 views
0 votes
6 answers

How can we define global variables in java?

To define Global Variable you can make ...READ MORE

Dec 15, 2020 in Java by Gitika
• 65,910 points
116,263 views
0 votes
12 answers

Java - sending HTTP parameters via POST method easily

Below are the steps we need to ...READ MORE

Dec 11, 2020 in Java by Rajiv
• 8,910 points
109,852 views
+1 vote
4 answers

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

To do this, we could read in ...READ MORE

Dec 14, 2020 in Java by Roshni
• 10,520 points
96,200 views
+4 votes
4 answers

Using while loop i want to print 10 even numbers

Hello @Nitesh, you are pretty much there. ...READ MORE

Nov 22, 2018 in Java by Priyaj
• 58,090 points
91,313 views
0 votes
0 answers

UnsatisfiedDependencyException: Error creating bean with name

 I'm trying to create a Spring CRUD ...READ MORE

May 21, 2022 in Java by Kichu
• 19,050 points
50,290 views
0 votes
4 answers

How do I check if a file exists in Java?

To test to see if a file ...READ MORE

Dec 29, 2020 in Java by Rajiv
• 8,910 points
61,520 views
0 votes
1 answer

How to set selected value of jQuery Select2?

The third parameter of the new Option ...READ MORE

May 30, 2022 in Java by gaurav
• 23,260 points
37,324 views
+5 votes
4 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,450 points

edited Nov 7, 2018 by Omkar 80,084 views
+1 vote
12 answers

Hibernate hbm2ddl.auto possible values and their uses

hibernate.hbm2ddl.auto (e.g. none (default value), create-only, drop, create, create-drop, validate, and update) Setting to perform SchemaManagementTool actions automatically as ...READ MORE

Dec 7, 2018 in Java by Shuvodip
74,699 views
+1 vote
7 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
• 58,090 points
68,724 views
0 votes
1 answer

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'demoRestController'

To answer your doubt, the DemoApplication class ...READ MORE

Feb 23, 2022 in Java by Aditya
• 7,680 points
35,008 views
0 votes
1 answer

How do I check if a string contains a substring in Java?

Hi@akhtar, The first and foremost way to check ...READ MORE

Dec 30, 2020 in Java by MD
• 95,440 points

edited Jul 5, 2023 by Khan Sarfaraz 53,044 views
+1 vote
4 answers

What is the difference between string object and string literal?

A String literal is a Java language concept. This ...READ MORE

Aug 16, 2019 in Java by Sirajul
• 59,230 points
65,654 views
0 votes
3 answers

HttpServletRequest get JSON POST data

Configure the action as given below: Method: Since ...READ MORE

Dec 16, 2020 in Java by Rajiv
• 8,910 points
67,425 views
0 votes
0 answers

what is class component in react ?

Jan 12 in Java by Evanjalin
• 360 points
160 views
0 votes
1 answer

Convert GMT to IST (India Standard Time) using javascript?

You can specify an IANA time zone ...READ MORE

Nov 7, 2022 in Java by Damonlang
• 700 points
17,848 views
0 votes
0 answers

How to iterate arraylist in java?

How does one perform iteration over an ...READ MORE

Dec 19, 2023 in Java by Saniya
• 3,320 points
232 views
0 votes
0 answers

How to capitalize first letter in java?

How can one implement the capitalization of ...READ MORE

Dec 19, 2023 in Java by Saniya
• 3,320 points
216 views
0 votes
1 answer

How to convert decimal to binary in java?

In Java, you can convert a decimal ...READ MORE

Dec 13, 2023 in Java by John
290 views
0 votes
1 answer

How to reverse a string in java word by word?

Here is the code to reverse a ...READ MORE

Dec 13, 2023 in Java by Anu
253 views
0 votes
1 answer

What is dynamic method dispatch in Java?

Dynamic Method Dispatch is a fundamental concept ...READ MORE

Nov 29, 2023 in Java by anonymous
• 3,320 points
400 views
0 votes
0 answers

how to sort 2d array in java ?

Nov 29, 2023 in Java by Evanjalin
• 360 points
310 views
0 votes
1 answer

Why Java is not pure object oriented?

Java is often described as not being ...READ MORE

Nov 29, 2023 in Java by anonymous
• 3,320 points
269 views
0 votes
0 answers

why so JavaScript and java have similar name

Nov 29, 2023 in Java by Priyanka
• 700 points
237 views
0 votes
1 answer

Why java is called platform independent?

Java is often referred to as a ...READ MORE

Nov 29, 2023 in Java by anonymous
• 3,320 points
240 views
0 votes
0 answers

how to compile java code in command prompt

how to compile java code in command ...READ MORE

Nov 29, 2023 in Java by Priyanka
• 700 points
188 views
0 votes
1 answer

How much time it takes to learn Java?

Learning Java, like any programming language, can ...READ MORE

Nov 29, 2023 in Java by anonymous
• 3,320 points
215 views
0 votes
1 answer

What is the default priority of a thread in java?

By default, in Java, when a thread ...READ MORE

Nov 29, 2023 in Java by Zoya
234 views
0 votes
1 answer

what is the extension of compiled java classes?

The extension of compiled Java classes is ...READ MORE

Oct 17, 2023 in Java by anonymous
• 520 points
1,874 views
0 votes
1 answer

What is truncation in Java?

In Java, truncation refers to the process ...READ MORE

Nov 2, 2023 in Java by anonymous
• 3,320 points
1,279 views
0 votes
1 answer

how to get ascii value of char in java

In Java, you can get the ASCII ...READ MORE

Nov 24, 2023 in Java by Zoya
232 views
0 votes
2 answers

What is the most important feature of java?

The most important feature of Java is ...READ MORE

Nov 29, 2023 in Java by anonymous
• 3,320 points
289 views
0 votes
1 answer

How to check java version in linux?

Checking your Java version on a Linux ...READ MORE

Nov 2, 2023 in Java by anonymous
806 views
0 votes
1 answer

How to run applet program in java?

Running an applet program in Java has ...READ MORE

Nov 9, 2023 in Java by anonymous
• 3,320 points
410 views