Let me tease u a little bit!! Below is a quite familiar java prog. :
public class MyDraft {
public static void main(String[] args) {
System.out.println("Hello World!");
System.out.println("Welcome to Java!");
MyDraft obj = new MyDraft();
System.out.println("Bye Bye!");
}
}
Now the ques. is : Can u do some familiar coding inside MyDraft class but outside the main() method i.e. u must not modify the main() method at all, so that the above prog. gives the output as: All are JavaGuru!
Hint: you have to think of a way such that the main() method doesn't get executed & only "All are JavaGuru!" gets printed in the output.
ANS. It is mentioned in the comments
JAVA QUESTION
Posted by gautam at Saturday, July 28, 2007 1 comments
Good books
1. the complete reference
2.core java
3.thinking in java
for scjp :
1.khalid mughal
2.katherine etc..
Posted by gautam at Saturday, July 28, 2007 0 comments
Objectives of SCJP
You can visit these links to know about the objectives of the exam
SCJP 1.4 :
http://www.sun.com/training/catalog/cou
SCP 5.0(SCJP 1.5)
http://www.sun.com/training/catalog/cou
Posted by gautam at Saturday, July 28, 2007 0 comments
Labels: SCJP
gud sites for SCJP
bill brogden site :http://www.wbrogden.com/
mock exam simulator :http://www.jchq.net/phezam/login.php
mock exam :http://www.akgupta.com/Java/mock_exam.
marcus green site :http://www.jchq.net/
list of SCJP links :http://www.wbrogden.com/books/javaexam
prometric site ( the exam conduting site):
https://www.register.prometric.com/
Posted by gautam at Saturday, July 28, 2007 0 comments
Labels: SCJP
A good SCJP site
This site has got mock tests for SCJP
http://www.danchisholm.net/
Posted by gautam at Saturday, July 28, 2007 0 comments
Labels: SCJP
format of the paper
You will find three types of questions on this examination:
* Multiple-Choice Questions with a Single-Correct Answer
* Multiple-Choice Questions with Multiple-Correct Answers
* Fill-In Questions Requiring your Typed Response.
Posted by gautam at Saturday, July 28, 2007 0 comments
Labels: SCJP
HOW TO APPLY FOR SCJP
Obtain an exam voucher from Sun Educational Services, local office.
Once you obtain the voucher, it can then be redeemed by signing up for the
test at Prometric which is done by making an appointment for specific
date and time. The voucher cannot be refunded back for your money, but it can be transferred. You must complete your exam within one calendar year of your paid registration date or your funds will be forfeited.
Posted by gautam at Saturday, July 28, 2007 7 comments
Labels: SCJP
SCJP books
* One of the most popular (and recommended) books is: SCJP Sun Certified Programmer for Java 5 Study Guide by Katherine Sierra and Bert Bates (K&B). The publisher is McGraw Hill Osborne Media -- ISBN 0072253606.
* Check the JavaRanch Bunkhouse for additional recommendations and reviews.
Posted by gautam at Saturday, July 28, 2007 0 comments
Labels: SCJP
Notes Of All The Different Versions of SCJP
SCJP 1.5:
* Dave Allen's notes (html)
* Dave Allen's notes (Yahoo briefcase, downloadable, printable Word format)
* Mikalai Zaikin's SCJP Tiger notes
* XyzWS.COM's SCJP study notes
SCJP 1.4:
* Jane Griscti's notes
* Manish Hatwalne's notes
* Whizlabs tutorials
SCJP 1.2:
* Ashraf Fouad's notes
* Carl's notes
* Heather MacKenzie's notes (Editor's Note: These might actually be for 1.1.)
* Manish Hatwalne's notes
* Velmurugan's notes
Various Versions:
* JDiscuss
* www.xyzws.com
Posted by gautam at Thursday, July 26, 2007 0 comments
Labels: SCJP
Mock SCJP exams
SCJP 1.5:
* eXamulator: 62 questions in total: http://www.examulator.com/phezam/login.php
* JavaBeat: 2 exams with 25 questions in total: http://www.javabeat.net/javabeat/scjp5/mocks/index.php
* WhizLabs Free Demo (3.94MB Download): http://www.whizlabs.com/scjp/scjp-5.0-details.html
* eJavaGuru.com: 1 quiz on Enums : http://www.ejavaguru.com/scjp5freemockexam.php
Various versions
* JavaRanch List of MockExams
* Maha Anna's list of mock exams
* XyzWS.com's list of mock exams
Look at my new dumps section
DUMPS Are all here
Posted by gautam at Thursday, July 26, 2007 1 comments
Labels: SCJP
How to Prepare for SCJP* Familiarize yourself with Sun's exam process, including objectives, registration, testing, etc. See Sun's SCJP page for detai
* Familiarize yourself with Sun's exam process, including objectives, registration, testing, etc. See Sun's SCJP page for details.
* If you are new to Java programming, start with a good introductory book such as Head First Java or Thinking in Java. Check the JavaRanch Bunkhouse for additional recommendations and reviews. Refer to the API documentation and the Java Language Specifications along the way.
* Once you have a foundation, study at least one good (and current) certification preparation book. (
* Use the SCJP forum to post questions, and reinforce your own understanding by answering other people's questions.
* Take as many mock exams as possible. Use these to determine where additional study is needed, and as a guide to when you are ready.
Posted by gautam at Thursday, July 26, 2007 2 comments
Labels: SCJP
What is new in exam for SCJP 1.5
* Exam objectives: Several important new language features have been added, including enums, generics, static imports, and autoboxing/unboxing. API features added to the exam include java.lang.StringBuilder, java.util.Locale, java.util.Formater, java.util.Scanner. java.util.regex.Pattern, and java.util.regex.Matcher. Java IO features have been added, including File, BufferedReader, BufferedWriter, FileReader, FileWriter and PrintWriter. Concepts such as loose coupling and high cohesion have been added, as well as greater emphasis on encapsulation as it relates to JavaBean conventions. Bit manipulation (e.g., shifting) has been dropped.
* Number of questions: 72 (increased from 61)
* Time: 175 minutes (increased from 120 minutes)
* Passing score: 59% (increased from 52%)
* Level of difficulty: The concensus is that it is more difficult.
* Format of questions: As before, you will always be told how many options to choose. No credit is given for partial answers.
Posted by gautam at Thursday, July 26, 2007 1 comments
Labels: SCJP
Java Dumps 2
These are java tutorials by A.K.Gupta
Posted by gautam at Sunday, July 22, 2007 0 comments
Labels: SCJP
Java Dumps
See this site it has got lots of stuff for SCJP
Posted by gautam at Sunday, July 22, 2007 0 comments
Labels: SCJP
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.
Posted by gautam at Thursday, July 19, 2007 0 comments
Labels: Tips
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{}
Posted by gautam at Tuesday, July 17, 2007 0 comments
Labels: Tips
Blogger Just Made Easier
Now You can post on your blog through WORD 2007 It has a feature publishing your post and asks for The account(Here it is Blogger) And also asks for your Username and Password And instantly u can publish your docs from blogger
Posted by gautam at Tuesday, July 17, 2007 0 comments
Labels: Help
Java Test3 Question 1 class SRC102 { public static void main (String[] args) { int i1 = Math.round(0.5f); int i2 = Math.round(1.5d); System.out.print(i1 + "," + i2); }} What is the result of attempting to compile and run the program? a. Prints: 0,1 b. Prints: 0,2 c. Prints: 1,1 d. Prints: 1,2 e. Compile-time error f. Run-time error g. None of the above Question 2 class A { public static void main (String args[]) { byte primitiveByte = 1; // 1 Byte b1 = new Byte(primitiveByte); // 2 Byte b2 = new Byte(1); // 3 System.out.print(b1.byteValue() + b2.byteValue()); }} What is the result of attempting to compile and run the program? a. Prints: 2 b. Prints: 11 c. Compile-time error at 1 d. Compile-time error at 2 e. Compile-time error at 3 f. Run-time error g. None of the above Question 3 class A { public static void main(String[] args) { Boolean b1 = new Boolean(true); // 1 Boolean b2 = new Boolean(false); // 2 Boolean b3 = new Boolean(TRUE); // 3 Boolean b4 = new Boolean(FALSE); // 4 Boolean b5 = new Boolean("TrUe"); // 5 Boolean b6 = new Boolean("fAlSe"); // 6 }} Compile-time errors are generated at which lines? a. 1 b. 2 c. 3 d. 4 e. 5 f. 6 Question 4 class SRC103 { public static void main (String[] args) { int i1 = Math.round(0.5f); int i2 = Math.round(1.5f); System.out.print(i1 + "," + i2); }} What is the result of attempting to compile and run the program? a. Prints: 0,1 b. Prints: 0,2 c. Prints: 1,1 d. Prints: 1,2 e. Compile-time error f. Run-time error g. None of the above Question 5 class MWC102 { public static void main (String[] args) { String s1 = "ABCDE"; System.out.print(s1.substring(1,2)+s1.substring(3)); }} What is the result of attempting to compile and run the program? a. Prints: AABC b. Prints: ACDE c. Prints: ABABC d. Prints: ABCDE e. Prints: BABCD f. Prints: BDE g. Prints: BCABCD h. Prints: BCDE i. Compile-time error j. Run-time error k. None of the above Question 6 Which of the following are not methods of the java.lang.String class? a. append b. concat c. delete d. insert e. replace f. substring g. valueOf
Posted by gautam at Tuesday, July 17, 2007 0 comments
Labels: Test
Util Package
Q1: | ||||||
A: | The Collections API is a set of classes and interfaces that support operations on collections of objects. | |||||
| | | ||||
| 2: | | ||||
| A: | The List interface provides support for ordered collections of objects. | | |||
| | | | |
Q3: | ||||
A: | The Vector class provides the capability to implement a growable array of objects. | |||
| | | ||
Q4: | ||||
A: | The Iterator interface is used to step through the elements of a Collection . | |||
| | |
Posted by gautam at Saturday, July 14, 2007 0 comments
Labels: notes
How To Create Javapath
My friends have problems with setting the CLASSPATH
so to set the classpath we follow the following steps
- we open the notepad
- we add the following data
set PATH=%path%;E:\program files\java\jdk1.6.0_01\bin;
set CLASSPATH=.;E:\program files\java\jdk1.6.0_01\lib;.;E:\java files\jchart2d-2.0.0.jar;
set JAVA_HOME=E:\program files\java\jdk1.6.0_01;
3. we save it as a .BAT file
my java was installed in E:\program files\java\jdk1.6.0_01\
if your java is in any other folder just replace this by the path where your java
files have been stored.
u must be thinking wat is jchart2d-2.0.0.jar
jchart2d is a java charting library and is used for dynamic charting
Posted by gautam at Friday, July 13, 2007 0 comments
Labels: Help