Most viewed questions in Java

0 votes
0 answers

How do you reverse a string in-place in JavaScript?

Without utilizing built-in methods (.reverse(),.charAt(), etc.), how ...READ MORE

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

Why does my JavaScript code receive a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error, while Postman does not?

I'm attempting to provide authorisation using JavaScript by connecting to the RESTful API integrated into Flask.  However, when I make the request, I receive the following error: XMLHttpRequest cannot load http://myApiUrl/login. No 'Access-Control-Allow-Origin' header ...READ MORE

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

How do I declare and initialize an array in Java?

How do I declare and initialize an ...READ MORE

Feb 8, 2022 in Java by Edureka
• 120 points
285 views
0 votes
0 answers

Best place to insert JavaScript within a HTML document

Where should the javascript code go? ...READ MORE

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

What is property in hasOwnProperty in JavaScript?

Consider: if (someVar.hasOwnProperty('someProperty') ) { // Do something(); } ...READ MORE

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

How to write palindrome in JavaScript

I'm wondering how to construct a palindrome ...READ MORE

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

How do I declare and initialize an array in Java?

How can I declare and initialize an ...READ MORE

Aug 11, 2022 in Java by krishna
• 2,820 points
283 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
283 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
281 views
0 votes
0 answers

What is the use of the JavaScript 'bind' method?

What is the use of bind() in ...READ MORE

Nov 17, 2022 in Java by Nicholas
• 7,760 points
279 views
0 votes
0 answers

creating list of objects in Javascript

Is it feasible to make a list ...READ MORE

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

How do I declare and initialize an array in Java?

To declare and initialize an array in ...READ MORE

Jun 22, 2023 in Java by Khan Sarfaraz
• 700 points
274 views
0 votes
0 answers

What is event bubbling and capturing?

What is the distinction between event bubbling ...READ MORE

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

When to use LinkedList over ArrayList in Java?

I've always been one to simply use: List<String> ...READ MORE

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

Where is Java's Array indexOf?

I am not able to find it. ...READ MORE

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

how to sort 2d array in java ?

Nov 29, 2023 in Java by Evanjalin
• 360 points
271 views
0 votes
0 answers

Which is better: <script type="text/javascript">...</script> or <script>...</script>

Which is more effective or convenient  ...READ MORE

Dec 9, 2022 in Java by Nicholas
• 7,760 points
270 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
266 views
0 votes
0 answers

Int division: Why is the result of 1/3 == 0?

I ran this code and got the result ...READ MORE

May 9, 2022 in Java by Kichu
• 19,050 points
266 views
0 votes
0 answers

Arrays of different types

Is it possible to have an array ...READ MORE

Aug 8, 2022 in Java by krishna
• 2,820 points
265 views
0 votes
0 answers

How to check if an object is a Promise?

Whether it's an ES6 Promise, a Bluebird ...READ MORE

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

Can I override and overload static methods in Java?

My questions are: Why can't static methods be ...READ MORE

May 15, 2022 in Java by Kichu
• 19,050 points
264 views
0 votes
1 answer

what is jsx in react

JSX (JavaScript XML) in React is a ...READ MORE

Oct 25, 2023 in Java by Aditya
263 views
0 votes
0 answers

window.onload vs document.onload

Which is more popular: window.onload or document.onload? READ MORE

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

What are the differences between a HashMap and a Hashtable in Java?

What are the differences between a HashMap and a Hashtable in ...READ MORE

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

Where is array's length property defined?

As you know, to determine the length ...READ MORE

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

What is TypeScript and why would I use it in place of JavaScript?

Could you kindly explain the TypeScript language? What ...READ MORE

Nov 16, 2022 in Java by Nicholas
• 7,760 points
260 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,320 points
259 views
0 votes
1 answer

What is garbage collection in the context of Java?

Garbage collection in the context of Java ...READ MORE

Oct 16, 2023 in Java by anonymous
• 3,320 points
257 views
0 votes
0 answers

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

Java doesn't allow multiple inheritance, but it ...READ MORE

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

What is lexical scope?

What is a concise overview of lexical ...READ MORE

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

What is the default access specifier in Java?

I just started reading a Java book ...READ MORE

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

How can I validate an email address in JavaScript?

To avoid the most basic mistyping, I'd ...READ MORE

Sep 20, 2022 in Java by Nicholas
• 7,760 points
254 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
254 views
0 votes
0 answers

What's the best way to convert a number to a string in JavaScript?

What method is the "best" for convert ...READ MORE

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

testingtesttest

This category is home to all kinds ...READ MORE

Apr 26, 2022 in Java by anonymous
• 300 points
252 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
251 views
0 votes
0 answers

Testing questions and answer

This category is home to all kinds ...READ MORE

Feb 24, 2022 in Java by anonymous
• 120 points
250 views
0 votes
0 answers

What is the difference between ' and " in JavaScript?

When creating strings in JavaScript, the character'or ...READ MORE

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

What is DOM Event delegation?

Can anyone please explain event delegation in ...READ MORE

Nov 16, 2022 in Java by Nicholas
• 7,760 points
246 views
0 votes
0 answers

How is a JavaScript hash map implemented?

I'm using OpenLayers right now and need ...READ MORE

Dec 7, 2022 in Java by Nicholas
• 7,760 points
245 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
244 views
0 votes
0 answers

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

I encountered some code that appears to ...READ MORE

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

Why Java does not support multiple inheritance?

Java does not support multiple inheritance through ...READ MORE

Oct 23, 2023 in Java by anonymous
• 3,320 points
240 views
0 votes
0 answers

Multidimensional Arrays lengths in Java

How can I determine the lengths of ...READ MORE

Aug 8, 2022 in Java by krishna
• 2,820 points
239 views
0 votes
0 answers

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

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

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

How do I link a JavaScript file to a HTML file?

How should a JavaScript file be linked ...READ MORE

Dec 6, 2022 in Java by Nicholas
• 7,760 points
237 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
237 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
236 views