Trending questions in Java

0 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 in Java by avishek
• 120 points
1,256 views
0 votes
1 answer

What is Comparable in Java?

As the name itself suggests, Comparable is an interface which defines ...READ MORE

Jul 15 in Java by Neha
• 6,280 points
43 views
0 votes
1 answer

What is Just in time compiler in Java?

The Just-In-Time compiler is one of the integral parts ...READ MORE

Jul 14 in Java by Frankie
• 9,810 points
36 views
0 votes
1 answer

What do you mean by Socket Programming?

Socket programming is a way of connecting two ...READ MORE

Jul 14 in Java by Frankie
• 9,810 points
32 views
0 votes
10 answers

Java - sending HTTP parameters via POST method easily

I personally use Apache's HTTPClient/HttpCore libraries to do ...READ MORE

Dec 10, 2018 in Java by robocop
12,899 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 in Java by swats
86 views
0 votes
1 answer

i am getting sessionnotcreatedexception in appium

Hi... it says here that Appium cannot ...READ MORE

Jun 27 in Java by ajs3033
• 7,280 points
52 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 in Java by Akash
• 160 points
82 views
0 votes
1 answer

Abstract class provides partial abstraction. How?

An Abstract class in java may have ...READ MORE

Jun 25 in Java by Sirajul
• 31,180 points
67 views
0 votes
0 answers

Sending request using json object return 404 error code

I am getting mad with this code ...READ MORE

Jun 19 in Java by FooBayo
• 120 points

edited Jun 19 by FooBayo 57 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 in Java by Priyaj
• 56,900 points
4,900 views
0 votes
1 answer

Is there a way to mask the password from java user input that comes from Scanner class and System.out.Println()?

You can use the console class to do so. ...READ MORE

May 27 in Java by Omkar
• 67,600 points
818 views
0 votes
2 answers

Reverse an Array in Java

If you want to reverse the array ...READ MORE

Aug 28 in Java by Sirajul
• 31,180 points
42 views
0 votes
1 answer

How can I make my output float when my two integers are integer?

Hi Prapti , I got your doubt please check ...READ MORE

Jun 3 in Java by sampriti
• 1,100 points
31 views
0 votes
2 answers

How to rotate an array from a particular index?

private static void rotate(int[] arr, int order) ...READ MORE

Aug 29 in Java by Sirajul
• 31,180 points
28 views
0 votes
2 answers

How to take input using BufferedReader in Java?

Reading User's Input using BufferedReader class: By wrapping ...READ MORE

Aug 16 in Java by Sirajul
• 31,180 points
229 views
0 votes
1 answer

How can I compare two integers properly?

Hi Divya, I hope this code snippet will ...READ MORE

May 31 in Java by sampriti
• 1,100 points
32 views
0 votes
1 answer

How to Iterate HashMap?

Hi Shashank. Please try this code I hope ...READ MORE

May 30 in Java by sampriti
• 1,100 points
26 views
0 votes
2 answers

What is the difference between string object and string literal?

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

Aug 16 in Java by Sirajul
• 31,180 points
263 views
0 votes
0 answers

Where i have to put resource package so it's accessible by external jar in eclipse?

Servlet.init() for servlet [JERSEY] threw exception java.lang.ExceptionInInitializerError cause by ...READ MORE

May 29 in Java by anonymous

edited May 30 by Omkar 36 views
0 votes
1 answer

can i run two tomcat servers on the same linux VM machine?

Yes its possible. I had installed tomcat ...READ MORE

May 28 in Java by arvind.phulare1911
• 180 points
35 views
0 votes
1 answer

Can Enum implement Class

Enum is a type similar to that ...READ MORE

May 27 in Java by Sirajul
• 31,180 points
29 views
0 votes
1 answer

Should a class file always be inside package for importing it in jsp page?

Hey there! It is not necessary for the ...READ MORE

May 24 in Java by Karan
45 views
0 votes
2 answers

Converting between java.time.LocalDateTime and java.util.Date

Try this: Date in = new Date(); LocalDateTime ldt ...READ MORE

Aug 27 in Java by Sirajul
• 31,180 points
167 views
+1 vote
2 answers

Non-static variable cannot be referenced from a static context. Explain?

class Program { int count ...READ MORE

Sep 27 in Java by anonymous
4,860 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 in Java by Vicky

closed May 16 by Vardhan 31 views
0 votes
1 answer

GSON throwing “Expected BEGIN_OBJECT but was BEGIN_ARRAY”?

This will work: ChannelSearchEnum[] enums = gson.fromJson(yourJson, ChannelSearchEnum[].class); But ...READ MORE

Dec 26, 2018 in Java by Sushmita
• 6,880 points
6,126 views
0 votes
1 answer

What are the different types of database testing?

The 3 types of Database Testing are Structural ...READ MORE

May 9 in Java by Frankie
• 9,810 points
60 views
+1 vote
10 answers

How to make mock to void methods with mockito

You can use partial mocking to serve ...READ MORE

Dec 7, 2018 in Java by nitesh
9,870 views
0 votes
2 answers

“Cannot find symbol” compilation error

The "Cannot find symbol" errors generally occur when you ...READ MORE

Apr 3 in Java by patricblues
• 140 points
7,973 views
0 votes
2 answers

Why it is not possible to define a static method in a Java interface?

Interfaces are concerned with polymorphism which is ...READ MORE

Aug 27 in Java by Sirajul
• 31,180 points
84 views
0 votes
2 answers

How to ignore exception in Java?

There is no way to basically ignore a ...READ MORE

Aug 16 in Java by Sirajul
• 31,180 points
438 views
0 votes
1 answer

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

The proper syntax to run a jar ...READ MORE

Apr 22 in Java by Omkar
• 67,600 points
254 views
0 votes
1 answer

How to download Eclipse on a flash drive and use it on a public computer?

To use Eclipse from a flash drive, ...READ MORE

Apr 22 in Java by Omkar
• 67,600 points
271 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
54 views
0 votes
1 answer

How to refresh data in ViewPager Fragment ?

Using the ViewPager.OnPageChangeListener is the correct way to go, ...READ MORE

Mar 6 in Java by developer_1
• 3,300 points
1,895 views
+1 vote
2 answers

What is coercion in Polymorphism?

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

Jun 25 in Java by anonymous
161 views
0 votes
2 answers

How to iterate in a HashMap in Java?

Iterating using Iterator. Using Generics: Map<Integer, Integer> map = ...READ MORE

Aug 28 in Java by Sirajul
• 31,180 points
52 views
0 votes
2 answers

How to convert List<Integer> to int[] in Java?

In addition to Commons Lang, you can ...READ MORE

Aug 20 in Java by Sirajul
• 31,180 points
859 views
0 votes
1 answer

How can I solve this: To prevent a memory leak, the JDBC Driver has been forcibly unregistered

What can you do? Ignore these warnings. Tomcat ...READ MORE

Jan 8 in Java by Daisy
• 8,050 points
4,108 views
0 votes
2 answers

In Java, what is the best way to determine the size of an object?

I happened to find a java class "jdk.nashorn.internal.ir.debug.ObjectSizeCalculator", ...READ MORE

Aug 19 in Java by Sirajul
• 31,180 points
140 views
0 votes
2 answers

Maximum size of an Java array

There are actually two limits.  The maximum element ...READ MORE

Aug 20 in Java by Sirajul
• 31,180 points
567 views
0 votes
2 answers

How to move or copy a file in Java

The new JAVA Specification Request 203 -NIO will ...READ MORE

Aug 20 in Java by Sirajul
• 31,180 points
35 views
0 votes
2 answers

Java: convert List<String> to a String

With a java 8 collector, this can ...READ MORE

Aug 30 in Java by Sirajul
• 31,180 points
32 views
0 votes
1 answer

Create fucntion to find GCD of two numbers

Hey @Diya, here is a code on how ...READ MORE

Mar 28 in Java by Priyaj
• 56,900 points
35 views
0 votes
2 answers

Java Security: Illegal key size or default parameters

Starting from Java 9 or 8u151, you ...READ MORE

Aug 23, 2018 in Java by parth295
• 4,640 points
1,377 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,380 points

edited Nov 6, 2018 by Omkar 9,266 views
0 votes
2 answers

What is the meaning of purpose of this command: java -jar <some jar file>.jar ?

JAR (Java Archive) file is a package file ...READ MORE

Mar 21 in Java by Omkar
• 67,600 points
49 views