Alankritha Ammu has Published 60 Answers

What are MAX_VALUE and MIN_VALUE in JavaScript?

Alankritha Ammu

Alankritha Ammu

Updated on 15-Jun-2020 06:08:53

The Number.MAX_VALUE property belongs to the static Number object. It represents constants for the largest possible positive numbers that JavaScript can work with.The Number.MIN_VALUE property belongs to the static Number object. It represents constants for the smallest possible positive numbers that JavaScript can work with.ExampleYou can try to run the ... Read More

When Java runs faster than C++?

Alankritha Ammu

Alankritha Ammu

Updated on 13-Jun-2020 14:03:12

Following are the areas where Java has proved itself faster than C++.Memory allocation/deallocation: Memory allocation/deallocation is much faster and it is often faster to create a new big array instead of using the cached one.Object instantiation: Memory management done by GC of Java attributes faster object related operations on Java ... Read More

How to set JAVA_HOME for Java in Windows?

Alankritha Ammu

Alankritha Ammu

Updated on 13-Jun-2020 12:49:30

Assuming you have installed Java in c:\Program Files\java\jdk directory −Right-click on 'My Computer' and select 'Properties'.Click the 'Environment variables' button under the 'Advanced' tab.Now, add the 'JAVA_HOME' variable and set the path to the c:\Program Files\java\jdk'.

How to set CLASSPATH variable for JDK?

Alankritha Ammu

Alankritha Ammu

Updated on 13-Jun-2020 12:40:13

Assuming you have stored your Java programs in c:\myprograms\ directory −Right-click on 'My Computer' and select 'Properties'.Click the 'Environment variables' button under the 'Advanced' tab.Now, add the 'CLASSPath' variable and set the path to the c:\myprograms\'.

What happens in Java Program at compile time?

Alankritha Ammu

Alankritha Ammu

Updated on 13-Jun-2020 12:24:56

During compile time, java compiler (javac) takes the source file .java file and convert it to bytecode .class file.

What is the role of Keyboard Event shiftKey Property in JavaScript?

Alankritha Ammu

Alankritha Ammu

Updated on 23-May-2020 10:08:04

The altkey property is used to show whether SHIFT key is pressed or not when key event was triggered.ExampleYou can try to run the following code to learn how to implement shiftKey property in JavaScript.                 Press any key     ... Read More

What is JavaScript Bitwise OR (|) Operator?

Alankritha Ammu

Alankritha Ammu

Updated on 20-May-2020 09:35:39

If one of the bits are 1, then 1 is returned when Bitwise OR (|) operator is used.ExampleYou can try to run the following code to learn how to work with JavaScript Bitwise OR Operator.                    document.write("Bitwise OR Operator");          // 7 = 00000000000000000000000000000111          // 1 = 00000000000000000000000000000001          document.write(7 | 1);          

How to check if a String contains another String in a case insensitive manner in Java?

Alankritha Ammu

Alankritha Ammu

Updated on 26-Feb-2020 09:59:12

One way to do it to convert both strings to lower or upper case using toLowerCase() or toUpperCase() methods and test.ExampleLive Demopublic class Sample {    public static void main(String args[]){       String str = "Hello how are you welcome to Tutorialspoint";       String test = ... Read More

How to test if a string contains specific words in Java?

Alankritha Ammu

Alankritha Ammu

Updated on 26-Feb-2020 09:56:55

The java.lang.String.contains() method returns true if and only if this string contains the specified sequence of char values.ExampleLive Demopublic class Sample {    public static void main(String args[]){       String str = "Hello how are you welcome to tutorialspoint";       String test = "tutorialspoint";     ... Read More

String charAt() Method in Java with Example.

Alankritha Ammu

Alankritha Ammu

Updated on 26-Feb-2020 08:17:16

The charAt() method of the String class returns the char value at the specified index. An index ranges from 0 to length() - 1. The first char value of the sequence is at index 0, the next at index 1, and so on, as for array indexing.ExampleLive Demoimport java.lang.*; public ... Read More

Advertisements