Trending questions in Java

0 votes
0 answers

How to initialize an array in Java?

I am initializing an array like this: public ...READ MORE

May 4, 2022 in Java by Rahul
• 3,380 points

edited Mar 4, 2025 461 views
0 votes
0 answers

For-each over an array in JavaScript

How can I loop through all the ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
1,049 views
0 votes
0 answers

What is the !! (not not) operator in JavaScript?

I saw some code that seems to ...READ MORE

Apr 13, 2022 in Java by Rahul
• 3,380 points
1,239 views
0 votes
0 answers

Reversing an Array in Java [duplicate]

If I have an array like this: 1 ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
930 views
0 votes
0 answers

What is a JavaBean exactly?

I understood, I think, that a "Bean" ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
1,009 views
0 votes
0 answers

How can I get bootstrap version via javascript?

Is there any way to get bootstrap ...READ MORE

Apr 13, 2022 in Java by Rahul
• 3,380 points
1,260 views
0 votes
0 answers

Java inner class and static nested class

What is the main difference between an ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
889 views
0 votes
0 answers

Simplest and understandable example of volatile keyword in Java

I'm reading about volatile keyword in Java and completely ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
947 views
0 votes
0 answers

Change date format in a Java string

I've a String representing a date. String date_s = "2011-01-18 ...READ MORE

Apr 14, 2022 in Java by Rahul
• 3,380 points
1,058 views
0 votes
0 answers

How does the Java 'for each' loop work?

Consider: List<String> someList = new ArrayList<String>(); // add "monkey", ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
842 views
0 votes
1 answer

Exception in thread main java.util.InputMismatchException error

Problem int name; //Name should be of type ...READ MORE

Feb 18, 2022 in Java by Rahul
• 9,690 points
3,370 views
0 votes
0 answers

What is the point of "final class" in Java?

I am reading a book about Java ...READ MORE

Apr 27, 2022 in Java by Rahul
• 3,380 points

edited Mar 4, 2025 445 views
0 votes
0 answers

Java Code for calculating Leap Year?

I am following "The Art and Science ...READ MORE

Apr 27, 2022 in Java by Rahul
• 3,380 points

edited Mar 4, 2025 444 views
0 votes
0 answers

How do I reverse an int array in Java?

I am trying to reverse an int ...READ MORE

Apr 27, 2022 in Java by Rahul
• 3,380 points

edited Mar 4, 2025 406 views
0 votes
0 answers

How to use Comparator in Java to sort

I learned how to use the comparable ...READ MORE

Apr 27, 2022 in Java by Rahul
• 3,380 points

edited Mar 4, 2025 404 views
0 votes
1 answer

Uncaught referenceerror: $ is not defined

The references must be aligned or put ...READ MORE

Feb 8, 2022 in Java by Rahul
• 9,690 points
3,628 views
0 votes
0 answers

Reverse a string in Java

I have "Hello World" kept in a ...READ MORE

Apr 14, 2022 in Java by Rahul
• 3,380 points
841 views
0 votes
0 answers

How to make a new List in Java

We create a Set as: Set myset = new HashSet() How ...READ MORE

Apr 14, 2022 in Java by Rahul
• 3,380 points
813 views
0 votes
1 answer

Not able to resolve Datatable SCRIPT5007: Unable to set property '_DT_CellIndex' of undefined or null reference

I had experienced the same error! What ...READ MORE

Feb 16, 2022 in Java by Soham
• 9,730 points
3,162 views
0 votes
1 answer

Cannot read property 'push' of undefined when combining arrays

The reason why you get this ERROR ...READ MORE

Feb 11, 2022 in Java by Rahul
• 9,690 points
3,228 views
0 votes
1 answer

JSON formatter in C#?

 In order to do the needful, one ...READ MORE

Feb 8, 2022 in Java by Rahul
• 9,690 points
3,331 views
0 votes
1 answer

Failed to load resource: the server responded with a status of 404 (not found)

In order to avoid an error while ...READ MORE

Feb 8, 2022 in Java by Rahul
• 9,690 points
3,068 views
0 votes
1 answer

__proto__ VS. prototype in JavaScript

To answer your query, the __proto__ is ...READ MORE

Feb 22, 2022 in Java by Aditya
• 7,680 points
2,359 views
0 votes
1 answer

Protocol handler initialization failed:

For me the protocol handler initialization failed ...READ MORE

Feb 17, 2022 in Java by Aditya
• 7,680 points
2,544 views
0 votes
1 answer

Render HTML to an image

To answer your question, there are a ...READ MORE

Feb 8, 2022 in Java by Soham
• 9,730 points
2,933 views
0 votes
0 answers

Using while loop, I want to print the first x even numbers, x being the user input

public static void main(String[] args)     {         Scanner input = ...READ MORE

Apr 5, 2022 in Java by Skulltrooper

edited Mar 4, 2025 482 views
0 votes
1 answer

How can I check for "undefined" in JavaScript?

If you are interested in finding out ...READ MORE

Feb 22, 2022 in Java by Aditya
• 7,680 points
2,228 views
0 votes
1 answer

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

 While I was solving this problem, the ...READ MORE

Feb 17, 2022 in Java by Aditya
• 7,680 points
2,434 views
0 votes
1 answer

jQuery AJAX submit form

There is a simple input mentioned below ...READ MORE

Feb 8, 2022 in Java by Soham
• 9,730 points
2,728 views
0 votes
1 answer

Using setTimeout to delay timing of jQuery actions

To answer your question, the .html() only ...READ MORE

Feb 9, 2022 in Java by Rahul
• 9,690 points
2,683 views
0 votes
1 answer

How to redirect to an external URL from controller action in Spring MVC?

Hello @kartik, You can do it with two ...READ MORE

May 22, 2020 in Java by Niroj
• 82,800 points

edited Mar 4, 2022 by Sarfaraz 29,814 views
0 votes
0 answers

I'm trying to do a while loop that prints out the first x even numbers, x being the number i input.

public static void main(String[] args)         {             int num;         Scanner ...READ MORE

Apr 1, 2022 in Java by Skulltrooper

edited Mar 4, 2025 411 views
0 votes
1 answer

Which is faster amongst an Array and an ArrayList?

Array is faster in to an access ...READ MORE

Feb 16, 2022 in Java by Saurabh Maurya

edited Mar 5, 2025 30,267 views
0 votes
1 answer

Angular: conditional class with *ngClass

For your information, the latest Angular version ...READ MORE

Feb 9, 2022 in Java by Rahul
• 9,690 points
2,041 views
0 votes
1 answer

Compare two dates with JavaScript

 The Date object will do what you ...READ MORE

Feb 18, 2022 in Java by Rahul
• 9,690 points
1,569 views
0 votes
1 answer

How to check a radio button with jQuery?

For versions of jQuery equal or above ...READ MORE

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

Parsing a string to a date in JavaScript

The best string format for string parsing ...READ MORE

Feb 18, 2022 in Java by Aditya
• 7,680 points
1,480 views
0 votes
1 answer

Programming Test - Codility - Dominator

After I had Googled "computing dominant member ...READ MORE

Feb 11, 2022 in Java by Soham
• 9,730 points
1,746 views
0 votes
1 answer

How do I get the current date in JavaScript?

To ensure that you get the current ...READ MORE

Feb 18, 2022 in Java by Aditya
• 7,680 points
1,441 views
0 votes
1 answer

What's the difference between using "let" and "var"?

The main difference is scoping rules wherein ...READ MORE

Feb 17, 2022 in Java by Aditya
• 7,680 points
1,450 views
0 votes
1 answer

What does "javascript:void(0)" mean?

The href of the link helps with ...READ MORE

Feb 8, 2022 in Java by Rahul
• 9,690 points
1,829 views
0 votes
1 answer

Why is there no multiple inheritance in Java, but implementing multiple interfaces is allowed?

To answer your doubt, the reason is ...READ MORE

Feb 10, 2022 in Java by Rahul
• 9,690 points
1,675 views
0 votes
1 answer

Problem with gif with transparent background

In this case, I have noticed that ...READ MORE

Feb 8, 2022 in Java by Rahul
• 9,690 points
1,743 views
0 votes
1 answer

How to merge two arrays in JavaScript and de-duplicate items?

With Underscore.js or Lo-Dash you can use: console.log(_.union([1, ...READ MORE

Feb 18, 2022 in Java by Aditya
• 7,680 points
1,278 views
0 votes
1 answer

Refresh a page using JavaScript or HTML

This can be solved by using the ...READ MORE

Feb 18, 2022 in Java by Aditya
• 7,680 points
1,217 views
0 votes
1 answer

This page didn't load Google Maps correctly. See the JavaScript console for technical details

The solution to your query is relatively ...READ MORE

Feb 11, 2022 in Java by Rahul
• 9,690 points
1,514 views
0 votes
1 answer

no 'access-control-allow-origin' header is present on the requested resource

The java <class-name> command syntax is one ...READ MORE

Feb 8, 2022 in Java by Soham
• 9,730 points
1,644 views
0 votes
1 answer

What is the JavaScript version of sleep()?

JavaScript has evolved significantly since the time ...READ MORE

Feb 18, 2022 in Java by Aditya
• 7,680 points
1,193 views
0 votes
1 answer

How do I efficiently iterate over each entry in a Java Map?

To answer your questions, use the following ...READ MORE

Feb 8, 2022 in Java by Soham
• 9,730 points
1,611 views
0 votes
1 answer

How to split a string in Java

By using the appropriate method, this can ...READ MORE

Feb 9, 2022 in Java by Rahul
• 9,690 points

edited Jul 6, 2023 by Khan Sarfaraz 1,556 views