Anjana has Published 66 Articles

How to create a Boolean object in JavaScript?

Anjana

Anjana

Updated on 15-Jun-2020 06:22:59

The Boolean object represents two values, either "true" or "false". If the value parameter is omitted or is 0, -0, null, false, NaN, undefined, or the empty string (""), the object has an initial value of false.Create a Boolean object like this −var val = new Boolean(value);ExampleYou can try to ... Read More

Explain Java Virtual Machine (JVM) Architecture

Anjana

Anjana

Updated on 13-Jun-2020 13:42:26

Classloader − Loads the class file into the JVM.Class Area − Storage areas for a class elements structure like fields, method data, code of method etc.Heap − Runtime storage allocation for objects.Stack − Storage for local variables and partial results. A stack contains frames and allocates one for each thread. ... Read More

What is Java Virtual Machine (JVM)?

Anjana

Anjana

Updated on 13-Jun-2020 12:57:43

JVM or Java Virtual Machine is a specification to provide the runtime environment on which a bytecode can be executed. JVMs are prepared platform specific and are available for almost all the hardware and machine.Features of JVM −It provides class loader to load a class.It provides bytecode verifier to verify ... Read More

Hello World Program in Java

Anjana

Anjana

Updated on 13-Jun-2020 12:08:50

Let us look at a simple code that will print the words Hello World.ExampleOnline Demopublic class MyFirstJavaProgram {    /* This is my first java program.     * This will print 'Hello World' as the output     */    public static void main(String []args) {   ... Read More

Why do we use a plus sign in front of function name in JavaScript?

Anjana

Anjana

Updated on 12-Jun-2020 08:26:41

The +function() {} notation is primarily used to force the parser to treat whatever follows the + as an expression. This is used for functions that are invoked immediately, for example, +function() { alert("Demo!"); }();However, + before a function is one of the symbols. You can add other options also ... Read More

What is the role of screenX Mouse Event in JavaScript?

Anjana

Anjana

Updated on 23-May-2020 09:36:05

When an event is triggerd, the screenX mouse event returns the horizontal coordinate of the mouse pointer.ExampleYou can try to run the following code to learn how to implement screenX Mouse event in JavaScript.           Click here to get the x (horizontal) and y (vertical) coordinates ... Read More

What is the usage of onhashchange event in JavaScript?

Anjana

Anjana

Updated on 21-May-2020 07:46:11

When anchor part is changed, then the onhashchange event occurs. You can try to run the following code to learn how to implement onhashchange event in JavaScript.Example           Click to change anchor                function functionChange() {     ... Read More

What is JavaScript Bitwise NOT(~) Operator?

Anjana

Anjana

Updated on 20-May-2020 09:36:34

The Bitwise NOT (~) Operator performs NOT operation on the bits. You can try to run the following code to learn how to work with JavaScript Bitwise NOT Operator.Example                    document.write("Bitwise NOT Operator");          // 7 = 00000000000000000000000000000111          document.write(~7);          

How can a user start new MySQL transaction?

Anjana

Anjana

Updated on 27-Feb-2020 11:02:37

By running the command START TRANSACTION, a user can start new MySQL transaction. The behavior of the transaction will depend upon the SQL AUTOCOMMIT mode. The default mode is ‘AUTOCOMMIT ON’ mode where each MySQL statement is considered as a complete transaction and committed by default when it finishes. It ... Read More

Java String Contains Example.

Anjana

Anjana

Updated on 26-Feb-2020 09:40:10

The contains() method of String class returns true if and only if this string contains the specified sequence of char values.ExampleLive Demoimport java.lang.*; public class StringDemo {    public static void main(String[] args) {       String str1 = "tutorials point", str2 = "http://";       CharSequence cs1 = ... Read More

Advertisements