Most viewed questions in Java

0 votes
0 answers

How do I get the current time only in JavaScript

In JavaScript, how can I retrieve the ...READ MORE

Dec 9, 2022 in Java by Nicholas
• 7,760 points
415 views
0 votes
0 answers

Benefits of arrays

The benefits of a list over an ...READ MORE

Aug 3, 2022 in Java by krishna
• 2,820 points
415 views
0 votes
1 answer

Compiling error in Java

Generally the file name and the class ...READ MORE

Mar 7, 2019 in Java by Priyaj
• 58,090 points
413 views
0 votes
1 answer

How to convert a Set to List in Java?

Hi@MD, The most straightforward way to convert a ...READ MORE

Dec 30, 2020 in Java by akhtar
• 38,230 points

edited Jun 22, 2023 by Khan Sarfaraz 412 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
411 views
0 votes
1 answer

Double decimal formatting in Java

Using String.format, you can do this: double price ...READ MORE

Aug 23, 2018 in Java by Parth
• 4,630 points
408 views
0 votes
1 answer

How to send an email from JavaScript

Javascript does not natively support email sending. However, you may access the user's mail client: window.open('mailto:test@example.com'); There are also some parameters to pre-fill ...READ MORE

Nov 8, 2022 in Java by Damonlang
• 700 points
406 views
0 votes
2 answers

Is there any way to declare an array in-line?

Another way to do that, if you ...READ MORE

Aug 30, 2019 in Java by Sirajul
• 59,230 points
405 views
0 votes
0 answers

Difference between Relative path and absolute path in javascript

Have small clarifications, As of my knowledge, these ...READ MORE

Nov 8, 2022 in Java by Nicholas
• 7,760 points
404 views
0 votes
1 answer

Reverse a string in Java

To answer your question, you can use ...READ MORE

Feb 8, 2022 in Java by Soham
• 9,700 points
404 views
0 votes
0 answers

How do I "decompile" Java class files? [closed]

What program can I use to decompile ...READ MORE

Apr 21, 2022 in Java by Rahul
• 3,380 points
402 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
401 views
0 votes
1 answer

Avoiding NullPointerException in Java

This to me sounds like a reasonably ...READ MORE

Dec 21, 2020 in Java by Gitika
• 65,910 points
399 views
0 votes
0 answers

How to filter object array based on attributes?

The real estate house objects in my ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
398 views
0 votes
0 answers

Matrix multiplication using arrays

Utilizing multidimensional arrays, I'm attempting to create ...READ MORE

Aug 5, 2022 in Java by krishna
• 2,820 points
398 views
0 votes
1 answer

Aligning Diagram in Java

Without any evidence otherwise, I'd guess you've over-ridden the paint method ...READ MORE

Feb 11, 2019 in Java by developer_1
• 3,320 points
398 views
0 votes
0 answers

Error java.lang.OutOfMemoryError: GC overhead limit exceeded

When I execute my JUnit tests I am getting ...READ MORE

May 15, 2022 in Java by Kichu
• 19,050 points
397 views
0 votes
2 answers

I recently used Crockford's JSLint to check some of my JavaScript code, and it returned the following error:

"Use strict"; is a directive in JavaScript ...READ MORE

Sep 18, 2023 in Java by Rahul
• 240 points
394 views
0 votes
0 answers

What is "callback hell" and how and why does RX solve it?

Can someone provide a precise description and ...READ MORE

Nov 9, 2022 in Java by Nicholas
• 7,760 points
394 views
0 votes
1 answer

How does the Java 'for each' loop work?

for (Iterator<String> i = someIterable.iterator(); i.hasNext();) { ...READ MORE

Dec 22, 2020 in Java by Gitika
• 65,910 points
393 views
0 votes
0 answers

Generating Fibonacci Sequence

var x = 0; var y = 1; var ...READ MORE

Nov 17, 2022 in Java by Nicholas
• 7,760 points
391 views
0 votes
1 answer

Importing properties file from Java package

In case your class is present within ...READ MORE

Oct 15, 2018 in Java by code.reaper12
• 3,500 points
391 views
0 votes
1 answer

Unescaping HTML character entities in Java

I guess you can use this function: StringEscapeUtils.unescapeH ...READ MORE

Sep 25, 2018 in Java by anto.trigg4
• 3,440 points
391 views
0 votes
1 answer

What is the array initialization syntax when not in a declaration?

Probably you'd have to ask the Java ...READ MORE

Jul 13, 2018 in Java by Akrati
• 3,190 points
390 views
0 votes
0 answers

How to split a string in Java

I have a string, "004-034556", that I want ...READ MORE

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

What is the difference between "let" and "var"?

Although I've heard that it's referred to ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
388 views
0 votes
0 answers

How do I fill arrays in Java?

Is there a proper way to fill ...READ MORE

Aug 12, 2022 in Java by krishna
• 2,820 points
386 views
0 votes
0 answers

How do I replace all occurrences of a string in JavaScript?

Given a string: s = "Test abc test ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
385 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
385 views
0 votes
1 answer

How to clone ArrayList and also clone its contents?

Iterate on the items, and clone them ...READ MORE

Jun 5, 2018 in Java by Akrati
• 3,190 points
383 views
0 votes
0 answers

How does the "this" keyword work, and when should it be used?

I'm trying to figure out what the&nbs ...READ MORE

Dec 7, 2022 in Java by Nicholas
• 7,760 points
382 views
0 votes
0 answers

why the should be final

Sep 17, 2019 in Java by anonymous
382 views
0 votes
1 answer

Randomly selecting an element from an array

For randomly selecting an element, java.util.Random provides ...READ MORE

Oct 11, 2018 in Java by anto.trigg4
• 3,440 points
381 views
0 votes
1 answer

How could I implement autocompletion using Swing?

Hello, You can try out this: import java.awt.*; import java.awt.event.*; import ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,880 points
379 views
0 votes
0 answers

Comparing java.utilDate with LocalDate in java

I have a method wherein have to ...READ MORE

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

What 'type' of Language is JavaScript?

The structure of programming languages is frequently ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
372 views
0 votes
1 answer

window.onload vs document.onload

For the window.onload by default, it fires ...READ MORE

Feb 9, 2022 in Java by Rahul
• 9,670 points
371 views
0 votes
1 answer

Continue Keyword in Java

continue is kind of like goto. Are you familiar ...READ MORE

Jul 3, 2018 in Java by Rishabh
• 3,620 points
371 views
0 votes
0 answers

How do you use the ? : (conditional) operator in JavaScript?

In simple words, what is the ?: ...READ MORE

Nov 9, 2022 in Java by Nicholas
• 7,760 points
365 views
0 votes
0 answers

how to find lenght of string in java ?

java READ MORE

Nov 12, 2021 in Java by anonymous
• 210 points
365 views
0 votes
1 answer

Comparing Functions in Java

I would suggest that Version 1 is ...READ MORE

Jan 9, 2019 in Java by developer_1
• 3,320 points
363 views
0 votes
0 answers

Define a global variable in a JavaScript function

Can a global variable be defined in ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
362 views
0 votes
0 answers

How to convert decimal to hexadecimal in JavaScript

In JavaScript, how do you translate decimal ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
361 views
0 votes
0 answers

What does document.forms mean in javascript?

What do the terms document.cookie, document.forms, and.value ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
361 views
0 votes
1 answer

How to use nested class in Java?

This program will help you understand the ...READ MORE

Mar 3, 2019 in Java by Priyaj
• 58,090 points
361 views
0 votes
0 answers

Convert Array to Object

What is the best way to convert: ['a','b','c'] to: { ...READ MORE

Sep 20, 2022 in Java by Nicholas
• 7,760 points
357 views
0 votes
0 answers

JavaScript Array splice vs slice

What is the distinction between splice and ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
356 views
0 votes
0 answers

What is a NullPointerException, and how do I fix it?

What are Null Pointer Exceptions (java.lang.NullPointerException) and ...READ MORE

Apr 26, 2022 in Java by Rahul
• 3,380 points
356 views
0 votes
0 answers

How do JavaScript closures work?

How would you explain JavaScript closures to ...READ MORE

Nov 15, 2022 in Java by Nicholas
• 7,760 points
355 views