SCJP AWT

Java Programming World, Inc.                                  Since 2005
java programming

    The contents of this page are intended for SCJP 1.4 exam (310-035). The Sun Certified Java Programmers Exam (SCJP) is the internationally recognized. This site includes java certification mock exams, practice tests, Frequently Asked Questions (faq), scjp2 study material and sample code created by a Sun Certified Java Programmer which makes java certification exam preparation very easy.

    Earning a sun certification provides a clear demonstration of the core java scjp skills. This page is devoted to Java programmer certification, the exam which is commonly known as SCJP. The page contains links to several excellent resources for sun certification java.

Resources for java certification SCJP exam. There are mock exams and other useful java links.

    For clearing SCJP tests you need to know the basics of core java. There are three variations in SCJP.
 

CX-310-025 for SCJP 1.2

Exam type            -       Multiple choice and short answer
Total Questions  -       59
Pass score           -       61% i.e. 36 of 69 questions must be answered

CX-310-035 for SCJP 1.4

Exam type            -       Multiple choice and short answer
Total Questions  -       61
Pass score           -       52% i.e. 32 of 61 questions must be answered

CX-310-055 for SCJP 1.5 / SCJP 5.0

Exam type            -       Multiple choice and short answer
Total Questions  -       72
Pass score           -       59% i.e. 43 of 72 questions must be answered

 

    SCJP  5.0  is the latest Entry Level Certification exam provided by SUN Microsystems. SCJP 5.0 is based up on J2SE 5.0. I recommend that u should choose J2SE 1.4 as it has more resources on the web. The fee is around $150. You can buy a Voucher online and take the test at any thompson optometric center (the voucher would be valid for 1 year using which you get 20% discount).

    The recommended scjp books that you need to follow are:

1. A Programmer's Guide to Java Certification
                                                                by Khalid Azim Mughal, Rolf Rasmussen

2. Sun Certified Programmer & Developer for Java 2 Study Guide (Exam 310-035 & 310-027)
                                                                Kathy Sierra and Bert Bates
 

Note: Below are some Useful Programming Resources. Please use <right-click> "Save Link as" for pdf and doc Files.

Java Links

Beginner Java Tutorial

JDBC Tutorial

Java Interview Questions

Sun Certification Material (SCJP)

scjp khalid mughal

A Programmer's Guide to Java Certification - by Khalid Mughal and Rolf Rasmussen - very very good ebook for the exam. This one contains detailed description, and explains IO, Threads, GC etc quite well.

Complete Java2 Certification Guide


This site provides all the information you would need to prepare for Suns Certification exam (SCJP2). It provides study material, sample questions for all the topics covered in the exam, a Certification FAQ, a mock exam, and links to many other related sites. 

 

SCJP mock Test

QUESTION : 1


  What will be the result of compiling and running the following code?
   import java.awt.*;
   import java.applet.*;
   public class AppletTest extends Applet {
     Label lbl = new Label("hello");
      public void init()
      {
      setSize(200,100);
      setVisible(true);
      lbl.setBackground(new Color(0,100,180));
      setLayout(new GridLayout(1,1));
      add(lbl);
      setLayout(new FlowLayout());
      lbl.setBounds(0,0,100,24);
      }
   }

1. The label will fill half the display area of the applet.
2. The label will be wide enough to display the text "hello"
3. The label will not be visiblle.
4. The label will fill the entire display area of the applet
5. The code will throw a run time error because of the second setLayout() call.

ANS : 2



QUESTION : 2


   What will be the result of compiling and running the following applet?
   import java.awt.*;
   import java.applet.*;
   public class AppletTest extends Applet {
      public void init()
      {
      super.init();
      PanelTest p = new PanelTest();
      p.init();
      setVisible(true);
      setSize(200,100);
      add(p);
   }
    
   class PanelTest extends Panel{
      Button b1 = new Button("Press me");
      public PanelTest()
      {
      setSize(200,100);
      setVisible(true);
      }
      public void init(){
      super.init();
      add(b1);
      }
     }
   }

1. The button will fill the entire display area of the applet.
2. The code will fail to compile.
3. The button will be just big enough to encompass it's label.
4. The applet's display area will be blank.

ANS : 2





QUESTION : 3
This code compiles without error.
class MyButton extends Button implements MouseListener{
 public MyButton(String lbl) {
   super(lbl);
   addMouseListener(this);
 }
 public void mousePressed(MouseEvent e){
 //do something
  }
}


1. False
2. True

ANS : 1
  


QUESTION : 4


    Which of the following are valid constructors for a TextField .


1. TextField();
2. TextField(int rows , int cols);
3. TextField(int cols , String txt); 
4. TextField(int cols);
5. TextField(String txt , boolean scrollBars);

ANS : 1,4



QUESTION : 5
         
      True or false?
       void setResizable(boolean) is a member of the Applet class.

1. True
2. False

ANS : 2



QUESTION : 6
   
   What is the result of attempting to compile and run the following. 
     import java.awt.*;
     import java.awt.event.*;
     class FrameTest extends Frame{
        Label lblTest  = new Label("TEST");
        Button btnTest = new Button(" TEST ");
        public static void main(String[] args){
          FrameTest ft = new FrameTest();
          ft.setLayout(new FlowLayout());
          ft.add(ft.lblTest);
          ft.add(ft.btnTest);
          ft.setSize(200,100);
          ft.setVisible(true);
          ft.enableEvents(AWTEvent.ACTION_EVENT_MASK);
        }  
       public void processActionEvent(ActionEvent event){
          super.processActionEvent(event);
            if(event.getID() == AWTEvent.ACTION_EVENT_MASK){
              if(event.getSource() instanceof Button){
               lblTest.setText("OK");  
               }
            }
        }
     }

1. The code will not compile
2. There will be a runtime error
3. The frame wil not be visible
4. Nothing happens when you click the button 
5. The label's caption changes to "OK" when you click the button

ANS : 1



QUESTION : 7
 
  What is the default layout for a Dialog ?

1. FlowLayout
2. GridLayout
3. CardLayout
4. BorderLayout
5. GridBagLayout

ANS : 4



QUESTION : 8

     True or false.
      A Dialog is a subclass of Frame. 

1. True
2. False

ANS : 2



QUESTION : 9

  Which of the following are valid constructors for a MenuItem ?


1. MenuItem()
2. MenuItem(String name)
3. MenuItem(String name , boolean removable)
4. MenuItem(String name , MenuShortcut sc)
5. MenuItem(boolean check)

ANS : 1,2,4



QUESTION : 10
  
      What will this draw ?
     public class AppletTest extends Applet{
     public void init(){
     setVisible(true);
     setSize(200,200);
     }
     public void paint(Graphics g){
     g.setColor(new Color(0,0,255)); 
     g.drawRect(50, 100 , 100, 50);
     }
    }

1. A rectangle 50 pixels wide with top left corner at 100, 50.  
2. A rectangle 50 pixels wide with top left corner at 50,100. 
3. A rectangle 100 pixels wide with top left corner at 50,100.  
4. A rectangle 100 pixels high with top left corner at 50,100.  
5. A rectangle 100 pixels high with top left corner at 100,50. 

ANS : 3

Get in touch with me personally at  hemanthjava@gmail.com

OTHER SITES OF MINE

FRESHERS JOBS AND PLACEMENT PAPERS

VTU PROJECTS AND PROGRAMS

 

Projects

1. Java Graphics Editor

scjp mock exams

These Mock exams will get you started with some simple practice questions. Its a great way to begin your SCJP 1.4 training.

scjp testking

Mock Exam Engine

1. Marcus Green Mock Exam 1

2. Marcus Green Mock Exam 2

3. Marcus Green Mock Exam 3

4. Java Test

5. Mock

6. Java Quiz 1

7. Java Quiz 2

8. Java Certification Mock Exam

Eclipse Tutorials

1. eclipse1.doc : A Simple tutorial showing how to create a project and execute code.

2. eclipse2.doc :  Frequently used Settings an Eclipse user should take care.

3. eclipse3.rtf :  Eclipse keyboard Shortcuts.

Sun Certifications are well recognized in the developers' community. Perhaps one of the reasons why Sun Certifications are so popular is that the exams are generally viewed as fairly challenging.

SCJP: A Sun Certified Java Programmer uses J2SE technologies to demonstrate the programming competence on Java platform.

Bob's Java Programming World, Inc. is independent of Sun Microsystems. All Rights Reserved