1. In java the Boolean always has value of True/False but not 0/1
2. In java transfer statements are -break ,continue , return , try-catch-finally , throw , assert
3. Bitwise operators in Java can be applied to the integer types, long, int, short, char, and byte only
4. Bitwise operator works on bits and performs the bit-by-bit operation. It does it operation only on bits.Bitwise operators are used to perform manipulation of individual bits of a number
5. After exit(0) statement in Java no further executions are done. The control gets exit and execution is stopped since JVM is stopped at backend.
6. Java Literals are syntactic representations of boolean, character, numeric, or string data. Literals provide a means of expressing specific values in your program. For example, in the following statement, an integer variable named count is declared and assigned an integer value. The literal 0 represents, naturally enough, the value zero.
int count =0
Similarly true/false represents boolean literal.
7. If base and derived class both has exceptions then the exception of Base class will be caught first and then the derived class
8.If there are nested try blocks and if the expected handling is not present in inner catch block then system will check to the outer catch blocks until it finds the expected Exception to handle
9. Static and Dynamic Binding :
a) Static binding in Java occurs during compile time while dynamic binding occurs during runtime.
b) private, final and static methods and variables use static binding and are bonded by compiler while virtual methods are bonded during runtime based upon runtime object.
c) Static binding uses Type (class in Java) information for binding while dynamic binding uses object to resolve binding.
d) Overloaded methods are bonded using static binding while overridden methods are bonded using dynamic binding at runtime.
10. The collection classes that are thread-safe in Java are Stack, Vector, Properties, Hashtable
11. ENUM is a datatype which consists of fixed number of constants. We can traverse through each values in it. It has mostly used 3 methods as : value(), valueOf(), and ordinal()
2. In java transfer statements are -break ,continue , return , try-catch-finally , throw , assert
3. Bitwise operators in Java can be applied to the integer types, long, int, short, char, and byte only
4. Bitwise operator works on bits and performs the bit-by-bit operation. It does it operation only on bits.Bitwise operators are used to perform manipulation of individual bits of a number
5. After exit(0) statement in Java no further executions are done. The control gets exit and execution is stopped since JVM is stopped at backend.
6. Java Literals are syntactic representations of boolean, character, numeric, or string data. Literals provide a means of expressing specific values in your program. For example, in the following statement, an integer variable named count is declared and assigned an integer value. The literal 0 represents, naturally enough, the value zero.
int count =0
Similarly true/false represents boolean literal.
7. If base and derived class both has exceptions then the exception of Base class will be caught first and then the derived class
8.If there are nested try blocks and if the expected handling is not present in inner catch block then system will check to the outer catch blocks until it finds the expected Exception to handle
9. Static and Dynamic Binding :
a) Static binding in Java occurs during compile time while dynamic binding occurs during runtime.
b) private, final and static methods and variables use static binding and are bonded by compiler while virtual methods are bonded during runtime based upon runtime object.
c) Static binding uses Type (class in Java) information for binding while dynamic binding uses object to resolve binding.
d) Overloaded methods are bonded using static binding while overridden methods are bonded using dynamic binding at runtime.
10. The collection classes that are thread-safe in Java are Stack, Vector, Properties, Hashtable
11. ENUM is a datatype which consists of fixed number of constants. We can traverse through each values in it. It has mostly used 3 methods as : value(), valueOf(), and ordinal()
No comments:
Post a Comment