OCPJP (SCJP 1.6)

Thursday, April 18, 2013

OOPJP(SCJP) Pass by reference or Pass by value?

›
public class PassByReference { public PassByReference() { List<String> list = new ArrayList<String>(); list.ad...
1 comment:
Wednesday, October 5, 2011

›
[TIP] Avoiding null pointer exception while comparing strings Most of the time in our code we compare a String variable with a constant stri...
Saturday, August 6, 2011

OCPJP(SCJP1.6) Question 30

›
1: import java.io.File; 2: import java.io.IOException; 3:   4: /** 5: * Created by IntelliJ IDEA. 6: * User: Own...
2 comments:

OCPJP(SCJP 1.6) Question 29

›
1: public class StringInstanceOfTest { 2: public static void main(String[] args) { 3: String s = null; 4: ...
Friday, July 22, 2011

Try and finally block to unlock the locked object.

›
A locked object has be unlocked appropriately in order to avoid dead locks. This can be achieved by keeping the locking mechanism in the try...
Tuesday, March 22, 2011

Tutorial : XML parsing in Java (NOT in SCJP)

›

Tutorial : JDBC Handwritten notes. (NOT in SCJP)

›
1 comment:

Tutorial : Early Binding vs Late Binding (Dynamic Binding)

›
Connecting a method call to method body is called as binding. If the binding happens during the compile time then it is called early bindin...
1 comment:
Thursday, February 10, 2011

SCJP 6 Question 28:

›
Which of these must be true if you execute the following command? java –classpath xyz hello.my.App Choose at least one answer. a. The def...
Wednesday, February 9, 2011

SCJP 6 Question 27

›
What is the result of compiling and running the given code? public class Regex1 { public static void main(String[] args){ String ...

SCJP 6 Question 26:

›
What will happen when you attempt to compile and run the following code? public class WrapTest { public static void main(String[] arg...
1 comment:
Tuesday, February 8, 2011

SCJP 6 Question 25:

›
Which of the following are true about the File class ? Select two choices. A. You can perform file I/O operations using its methods. B. Yo...

SCJP 6 Question 24:

›
Consider the following code statement. Float f = new Float(3.14); Choose one answer a. f.parseFloat("2.718") b. f.valueOf("3...
1 comment:
Wednesday, February 2, 2011

Question 23

›
What will happen when you attempt to compile and run the given code? public class StringEquals { public static void main(String[] arg...
Monday, January 31, 2011

Question 22

›
What is the result of compiling and running the given code? (Choose 1 Answer) import java.text.NumberFormat; import java.text.ParseExcepti...
Sunday, January 30, 2011

Question 21

›
What is the result of attempting to compile and run the given code? import java.util.*; public class ScannerDelimiter2 { public static...

Question 20

›
What is the result of compiling and running the given code? import java.util.Scanner; public class ScannerDelimiter { public static v...

Question 19

›
What is the result of compiling and running the given code? public class NullPointerString { public static void main(String[] args){ ...

Question 18

›
Which of the following methods are defined by the Serializable interface? Options : A. readObject() and writeObject() B. readExternal() a...
2 comments:
Saturday, January 29, 2011

Question 17

›
Which code fragment produces the same output as the following code? for ( int i=0; i< 10; i++) System.console().printf(" %d ...

Question 16

›
Which of the following classes define the printf() method? Select two choices. Options : A. Console B. PrintWriter C. Formatter D. Printer...

Question 15

›
Which of the following are true about the readPassword() method of the Console class? Select two choices. Options : A. Its return type is...
Friday, January 28, 2011

Question 14

›
What will be the result of attempting to compile and run the following program? public class CustomThread extends Thread{ public void ...

Question 13

›
Before which of the following can the "synchronized" keyword be placed, without causing a compilation error? Options : A. Class...

Question 12

›
What would be the result of an attempt to compile and run the following code? class TwoThreadsDemo extends Thread { public TwoThreadsDe...

Question 11

›
What would be the result of an attempt to compile and run the following code? Choose one answer. public class OrderedThread { public st...

Question 10

›
What will happen when you attempt to compile and run the following code? public class TestThread extends Thread{ public static void ...

Question 9

›
Which of the following statements are true about the sleep method of Thread class? Select two choices. Options : A . A thread releases any...

Question 8

›
What will happen when you attempt to compile and run the following code? public class TestThread extends Thread{ public static void ...

Question 7

›
Which of the following statements are true about synchronization?  (Select two choices) Options : A. Static methods cannot be synchronize...

Question 6

›
Given that a static method doIt() in the Work class represents work to be done, which of the following blocks of code will succeed in start...

Question 5

›
There are three Threads trying to invoke a method of an object. This method is a synchronized method to prevent conflict between Threads. Wh...

Question 4

›
What will be the result of an attempt to compile and run the following program? (Choose 1 Answer) public class ThreadPrediction { publ...

Question 3

›
What will be the result of an attempt to compile and run the following program? (Choose 1 Answer) public class ThreadPrediction { publ...

Question 2

›
What will be the result of an attempt to compile and run the following program? (Choose 1 Answer) public class ThreadPrediction { publ...

Question 1

›
Which of the following lines will not compile ?? Choose Two. 1: public class Question1 { 2: public Question1() { 3: } 4: ...
Sunday, January 23, 2011

Setting PATH and Classpath in Windows.

›
After installing JDK (download JDK here ) we have to set path and classpath variables. Path variable holds a the path to the executable fil...
1 comment:
Monday, October 18, 2010

Compiling code in Eclipse.

›
This tutorial is a continuation to my earlier tutorial about configuration of Eclipse. In this one I show you how to compile and execute cod...
Wednesday, October 13, 2010

Eclipse Configuration

›
Eclipse IDE is widely used in working environments. Most professional prefer to use Eclipse as it is considered to be industry standard IDE....
Tuesday, October 12, 2010

Difference between SCJP 1.5 and 1.6

›
Q :What is the difference between SCJP 1.5 vs SCJP 1.6? Ans :  SCJP 1.6 = SCJP 1.5 +  New API Contents (NavigableSet, NavigableMap, Garbage...

Mock Exams List

›
This is a raw list, I collected it from various websites including javaraunch.com. I am yet to refine it. It contains lot of material which ...
1 comment:

Books for SCJP 1.6 Exam.

›
So many people had sent me mails regarding the books to be followed for SCJP 1.6. My sincere suggestion to them was to follow “ SCJP Sun Cer...
1 comment:

Running your first program in JCreator.

›
After you setup JCreator the next task is to write a small code to verify the setup. This section will help you on writing java , compiling ...

Practice … Practice … Practice

›
Which ever blog you go, whatever material you read every one will suggest you to write small programs while reading for SCJP. Forget about t...
Home
View web version

Contributors

  • Unknown
  • Unknown
Powered by Blogger.