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 496 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,093 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,291 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
974 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,050 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,299 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
922 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
985 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,452 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,106 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
883 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 485 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 483 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 445 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 443 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,694 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
879 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
855 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,261 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,291 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,387 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,135 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,420 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,600 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,977 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 30,006 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,506 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,277 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 517 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,743 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,782 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 457 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,341 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,092 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,633 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,360 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,547 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,502 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,799 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,896 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,497 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,719 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,790 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,331 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,269 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,693 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,559 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,676 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,243 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,605 views