Default value of variable in java Variables declared inside a class are known as member variables (static or non static). These variables are initialized with their default value depending on the type of variable. For example variable of type int
Why is the java main method static?
main method in java is static This is neccesary because main() is called by the JVM before any objects are made. Since it is static it can be directly invoked via the class.
What is the difference between ArrayList and Vector in Java?
ArrayList vs Vector ArrayList Vector Not Synchronized and so not thread safe Synchronized therfore thread safe Fast in performance Slow as it is thread safe Introduced first in java version 1.2 Introduced first in java version 1.0 does not provide
What is the difference among String, StringBuffer and StringBuilder in Java?
What is the difference among String, StringBuffer and StringBuilder in Java? String String is immutable ( once created can not be changed )object . The object created as a String is stored in the Constant String Pool . Every immutable
What is immutable object in Java?
What is immutable object in Java? Immutable classes are Java classes whose objects can not be modified once created. Any modification in Immutable object result in new object. For example is String is immutable in Java. Mostly Immutable are also
Control Instruction
Control Instructions Program is a set of instructions. We know that each instruction of the program is executed by processor. Processor executes instructions one by one. Whatever we write in our program is executed in the same order as they
Assignment Operators
Assignment Operators Assignment operator is the most used operator in the expression. It is sometimes misinterpreted as equal to operators by beginners. Assignment operator is used to assign value to the variable. Assignment operator (=) It is a binary operator
Logical Operators
Logical Operators There are three logical operators in C language: ! Logical NOT && Logical AND || Logical OR Logical NOT Logical NOT operator is also a unary operator, as it requires only one operand. Operand is treated as either