Trending questions in Java

+9 votes
16 answers

javac' is not recognized as an internal or external command, operable program or batch file.

Try this it works fine : C:\ YourFolder ...READ MORE

Nov 13, 2018 in Java by Jino
• 5,820 points
• 523,727 views
+11 votes
13 answers

What are the default xmx and xms values ?

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

Nov 13, 2018 in Java by anonymous
• 420,507 views
+5 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,140 points
• 379,617 views
+3 votes
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
• 350 points
• 352,866 views
+3 votes
14 answers

com.mysql.cj.jdbc.exceptions.communicationsexception :Communications link failure

Exception in thread "main" com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link ...READ MORE

Dec 12, 2024 in Java by jack

edited Mar 6, 2025 • 270,354 views
+17 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
• 277,527 views
+2 votes
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
• 271,031 views
+3 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,440 points
• 262,975 views
+1 vote
6 answers

How to separate digits of a number in Java ?

String numberString = Integer.toString(number);  for (int i = ...READ MORE

Dec 5, 2023 in Java by Akash
• 100 points

edited Mar 5, 2025 • 223,671 views
+3 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
• 231,308 views
+1 vote
1 answer

error creating bean with name 'entitymanagerfactory' defined in class path resource

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

Feb 18, 2022 in Java by Aditya
• 7,680 points
• 171,228 views
+1 vote
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
• 200,889 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,730 points
• 174,191 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,870 points
• 171,334 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
• 134,751 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,870 points
• 134,195 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,730 points
• 124,581 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,870 points
• 120,422 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,020 points
• 101,986 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,440 points
• 106,093 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,040 points
• 60,231 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,870 points
• 76,184 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
• 93,218 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,020 points
• 86,772 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 • 90,680 views
0 votes
1 answer

How to get select2 selected value in Jquery ?

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

May 30, 2022 in Java by gaurav
• 25,250 points
• 45,572 views
0 votes
1 answer

How to check if a string contains a substring Java ?

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

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

edited Jul 5, 2023 by Khan Sarfaraz • 62,200 views
0 votes
1 answer

how to run java program in notepad?

To run a Java program in Notepad: Write ...READ MORE

Oct 17, 2023 in Java by anonymous
• 520 points
• 17,041 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
• 41,166 views
0 votes
0 answers

I have created a code in java for a flower shop and now my IDE is showing all the inputs are in red showing there is an error

what I am trying to accomplish is ...READ MORE

Jul 6, 2024 in Java by tim

edited Mar 5, 2025 • 3,383 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,190 points
• 73,021 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,870 points
• 74,261 views
0 votes
0 answers

how do I turn a double in an array from 1000 to infinity

I am trying to convert a double ...READ MORE

Jul 9, 2024 in Java by tim

edited Mar 5, 2025 • 1,968 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
• 26,549 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
• 10,962 views
0 votes
0 answers

dwdewwwwdsad

dwdw READ MORE

May 6, 2024 in Java by Edureka
• 100 points

edited Mar 5, 2025 • 2,290 views
0 votes
0 answers

This question for testing purpose

Testing purpose READ MORE

May 9, 2024 in Java by test

edited Mar 5, 2025 • 1,889 views
0 votes
1 answer

How to take character input in Java?

In Java, you can take character input ...READ MORE

Oct 19, 2023 in Java by anonymous
• 3,360 points

edited Oct 19, 2023 by anonymous • 9,585 views
0 votes
0 answers

How to display two independent different drop down list (different list) in Excel using Apache POI API

How to display two independent different drop ...READ MORE

Apr 4, 2024 in Java by anonymous

edited Mar 5, 2025 • 2,324 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,360 points
• 8,744 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
• 8,662 views
0 votes
1 answer

Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core”

If you have a jstl.jar file while ...READ MORE

Feb 17, 2022 in Java by Aditya
• 7,680 points

edited Jun 22, 2023 by Khan Sarfaraz • 34,412 views
0 votes
1 answer

No entitymanager with actual transaction available for current thread - cannot reliably process 'remove' call

Hii @kartik, If you have @Transactional // Spring Transactional class ...READ MORE

May 22, 2020 in Java by Niroj
• 82,800 points
• 61,551 views
0 votes
1 answer

What is the extension of java code files?

Java source code files often have the ...READ MORE

Oct 11, 2023 in Java by anonymous
• 3,360 points
• 7,518 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,360 points
• 5,131 views
0 votes
1 answer

How to convert string to char array in Java?

In Java, you can convert a `String` ...READ MORE

Nov 2, 2023 in Java by anonymous
• 3,360 points
• 5,650 views
0 votes
0 answers

what is class component in react ?

Jan 12, 2024 in Java by Evanjalin
• 36,180 points
• 1,765 views
0 votes
0 answers

how to sort 2d array in java ?

Nov 29, 2023 in Java by Evanjalin
• 36,180 points
• 3,320 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
• 3,000 views
0 votes
0 answers

why so JavaScript and java have similar name

Nov 29, 2023 in Java by Priyanka
• 4,380 points
• 2,505 views