Showing posts with label ocjp. Show all posts
Showing posts with label ocjp. Show all posts

Saturday 21 September 2013

FREE SJCP PRACTICE EXAMS





DeepJava Practice Tests (registration required)
Jiris - 6 Free Exams (free registration required)
etattva Online Exam (registration required)
ExamCram Practice Exam 1.4 (problem loading)
MindQ Exam (1.2)
SCJP Practice Tests  (hundred’s of questions)
JavaBeat Mock Exam 1 Page (plus many question links)
uCertify (4 downloadable trial tests, 5.0 and 6.0) (pay site)
Voodoo Downloadable Exam (373 questions)
Java Question Bank 1  (all questions are from other sites)
Witscale Exams (free registration page)







Saturday 29 June 2013

OCJP Latest Dumps

Hi All,
Many people on internet are looking for latest and valid Java SE 1.6 dumps.
On this post, I am sharing valid and latest dumps.
Click Here to download.
Please provide feedback after taking exams about the dumps.

Cheers !!

Question - 2

Give the code. What is the result?
class Hotel {
    public int bookings;
    public void book() {
        bookings++;
    }
}

public class SuperHotel extends Hotel {

    public void book() {
        bookings--;
    }
    
    public void book(int size) {
        book();
        super.book();
        bookings += size;
    }
    
    public static void main(String args[]) {
        SuperHotel hotel = new SuperHotel();
        hotel.book(2);
        System.out.print(hotel.bookings);
    }
}
 
(Correct Answer)

Wednesday 26 June 2013

Question - 1

Que:  Given a class Repetition:
1. package utils;
2.
3. public class Repetition {
4. public static String twice(String s) { return s + s; }
5. }
and given another class Demo:
1. // insert code here
2.
3. public class Demo {
4. public static void main(String[] args) {
5. System.out.println(twice("pizza"));
6. }
7. }
Which code should be inserted at line 1 of Demo.java to compile and run Demo to print "pizzapizza"?
A. import utils.*;
B. static import utils.*;
C. import utils.Repetition.*;
D. static import utils.Repetition.*;
E. import utils.Repetition.twice();
F. import static utils.Repetition.twice;
G. static import utils.Repetition.twice;

Answer: F