Subscribe to Java/SCJP        RSS Feed
- - - - -

SCJP Notes - Part 8

Icon Leave Comment
1) Static blocks/static methos/static variables are executed first in the order of thier appearance in the code.
After executing static's instance blocks/instance methos/instance variables are executed.
2) The reference may be null when calling a static method from main method.
3) float arr[][] = new float[][10]; is wrong
float arr[][]...
- - - - -

SCJP Notes - Part 7

Icon Leave Comment
1) The final keyword on a method means that the method cannot be overridden in a subclass. But since the main() method is a static method, it can't be overridden anyway. So making the main() method final makes no sense.

2) main method can be final.

3) A class without a main method can be run by JVM, if its ancestor class has a main method....
- - - - -

Compiler error for unreachable code

Icon Leave Comment
A sample:

while ( false ) {	System.out.println ( "Value" );}while(3>4) {	System.out.println ( "Value" );}
Page 1 of 1

November 2014

S M T W T F S
      1
2345678
9101112131415
16171819202122
232425 26 272829
30      

Recent Entries

Recent Comments

Search My Blog

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)