Showing posts with label Tips. Show all posts
Showing posts with label Tips. Show all posts

JAVA@COFFEE


JAVA TUTORIALS


JAVA DUMPS
TIPS



TIPS TO CRACK SCJP

1. THE BOOK:
The best reference for SCJP is Head First Java, 2nd Edition.
This books gives all the inside and out of java which is required for SCJP examination.


Caution
Herbert Schildt is a good book in general, but is not a good reference for SCJP and many of the texts in this book are not correct.
So in my opinion Head First Java, 2nd Edition is the Bible for SCJP.



2. SCJP DUMPS
SCJP Dumps are set of mock and previous year papers. Previous year questions are a must.
If one understands and masters all the questions, one can easily score in the range of 75 -100%.
These questions often get repeated and if one goes through the whole set, one is bound to get around 60-80% questions in the test from previous year papers.


3.TEST

First of all, make sure that you mark 'novice' in the survey taken by sun prior to the test(SCJP).
Don't ever mark 'intermediate' or 'expert' because the paper will become quite difficult and might be difficult to pass even.

Secondly, 'Drag and Drop Questions'- these questions have to be attempted very carefully.
Make sure you check before confirming your answer because after confirming if you try to check your answer,it gets refreshed, and your answers disappear.
So better technique is to try and check in the first attempt itself.

Good books


for java :

1. the complete reference
2.core java
3.thinking in java

for scjp :

1.khalid mughal
2.katherine etc..

Points to Remember

• Everything from the start marker of a comment block (e.g. /*)

is ignored until the first occurrence of the matching end marker (*/).

• The "throw" statement can only throw "Throwable" objects.

A NullPointerException will be thrown if the Exception given to the

"throw" statement results in null.

• In the same statement you can use decimal, octal and/or hexadecimal statements.

• While creating a multidimensional array, dimensions must be

created left to right. So, int [] [] array = new int [] [4]; is not valid.

• Elements of an un-initialized array object get the default value

corresponding to the type of the elements. Whether the array object

reference is a local or member variable, does not matter.

• In a switch statement the type of the case labels must be assignable to

the type of switch expression.

• It is not possible to break out of an "if" statement. If the "if" statement is placed

within a labeled block, a switch statement or a loop construct, the usage of "break"

would be valid.

• The "if" statement does not return any value.

• "continue" cannot be used outside the context of a loop.

• A variable declared in a "try" block is not visible in "catch" or "finally" block.

• If C extends B and B extends A, then it is not possible to call a method of A

( implemented in all the three classes ) from an instance method in class C.

• An object that has been eligible for garbage collection may stop being

eligible for garbage collection and return to normal life. This happens

if the call to the finalize() reestablishes a reference from the active part

of the program to the object.

• If a class has a final blank variable, then it must be initialized when an

instance is created ( in all the constructors or any initializer ) , or else

the code will fail to compile.

• A thread's status (user or daemon) can be changed before the thread

is started. Changing the status of a thread already started throws

IllegalStateException.

INSTANCE OF WORKS

We had a test last Sunday on Operators

Where we got to know that instanceof cannot be assigned

to Boolean values.

But this code snippet works fine when you compile in Java 1.5

class instanceofdemo

{ public static void main(String[] args)

{ Parent obj2 = new Child();

boolean a=obj1 instanceof Parent;

System.out.println("obj1 instanceof Parent: "+a);


 

}}

class Parent{}

class Child extends Parent implements MyInterface{}

interface MyInterface{}