Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: A simple test for you all

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking A simple test for you all

    This is a simple test for you all who want to see if YOU are the TRUE javaguru in these forums..
    Think you got what it takes? Well, take this test and see your score..
    I'll tell the right answers after at least 2 person have taken this test.
    Don't be afraid, there's only 15 questions and even I think they are easy, so the real java guru shouldn't have any trouble doing this quiz.
    GOOD LUCK!

    Question 1: State which of the following statements are true:
    a. A class can only contain one single method declaration.
    b. The most basic form of a method is one that has a return type
    but no arguments.
    c. All calling methods can be worker methods and all worker
    methods can be calling methods.
    d. Overloaded methods have the same number of arguments.

    Question 2: The main method accepts which of the following argument types:
    a. A String object
    b. An int type
    c. An array of references to String objects
    d. An array of String objects

    Question 3: Which method corresponds to the following method call?
    myPerson.printValues (100, 147.7F, "lavender");

    a. public void printValues (int pantSize, float
    ageInYears)
    b. public void printValues (pantSize, float
    ageInYears, favoriteColor)
    c. public void printValues (int pantSize, float
    ageInYears, String favoriteColor)
    d. public void printValues (float ageInYears, String
    favoriteColor, int pantSize)

    Question 4: Which of the following terms refers to the scope of a problem or a
    system:

    a. The problem context
    b. The problem domain
    c. The system context
    d. The problem area

    Question 5: Which of the following terms represents two different characteristics
    of an object:

    a. Methods and operations
    b. The problem domain
    c. Attributes and operations
    d. Variables and data

    Question 6: Which of the following statements is a criteria to test the validity of
    an object relative to a problem domain:

    a. Relevance to the problem domain
    b. Operation order
    c. Attribute type
    d. If a class has a super class

    Question 7: Which of the following statements are true:
    a. A class is an instance of an object.
    b. An object is a blueprint for a class.
    c. An object and a class are exactly the same.
    d. An object is an instance of a class.
    e. An attribute cannot be a reference to another object.

    Question 8: Which of the following statements defines an interface
    a. The way a class completes its tasks within a method
    b. The operations and attributes of an object
    c. The way other objects interact with an object
    d. The declaration of private attributes

    Question 9: State whether the following statements are true or false:
    a. The private members of an object can be accessed through
    public methods
    b. Constructors cannot be overloaded

    Question 10: The scope of a variable refers to:
    a. The lifetime of the variable
    b. Where a variable can be used within a program, also known as,
    the extent of a variable.
    c. The way other objects interact with an object
    d. Whether the variable is private or public

    Question 11: What is the default constructor for the following class?
    public class Penny {
    String name = "lane";
    }

    a. Penny()
    b. public Penny()
    c. class()
    d. String()

    Question 12: State whether the following statements are true or false:
    a. In the Java programming language, a superclass can inherit
    from its subclasses.
    b. An object is an abstract concept.

    Question 13: Which of the following Java programming language keywords
    indicates inheritance?

    a. The implements keyword
    b. The inherits keyword
    c. The extends keyword
    d. The imports keyword

    Question 14: The import keyword fulfills what task?
    a. It informs the virtual machine of the classes your program uses.
    b. It informs the virtual machine that you are using a graphic file
    in your program.
    c. It makes your program easier to read by allowing you to use
    shortened names when referring to classes in the Java API.
    d. It informs the compiler that you are compiling a program using
    classes from the Java API.

    Question 15: From which Java API package are the String, Math, and Integer
    classes implicitly imported?

    a. The java.awt package
    b. The java.applet package
    c. The java.lang package
    d. The java.io package


  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: A simple test for you all

    I do have to say some of these questions are just plain utter dumb and have little relevance to Java and in no way will these questions tell you if you are a "java guru".

    What was your score if I might ask?

    // Json

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: A simple test for you all

    I got 10 / 15..
    Not too bad for a guy who has never learned java before, aye?
    I went to the library to read a java manual, after that I understanded a whole lot..

  4. #4
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: A simple test for you all

    Well done

    // Json

  5. #5
    Junior Member
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: A simple test for you all

    Json, why don't u give it a try?
    I'm eager to see what your score would be!

  6. #6
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: A simple test for you all

    Maybe later when I have some more time.

    // Json

  7. #7
    Member Fendaril's Avatar
    Join Date
    Nov 2008
    Posts
    54
    Thanks
    7
    Thanked 6 Times in 5 Posts

    Default Re: A simple test for you all

    1-c
    2-d
    3-c
    4-b
    5-d
    6-c
    7-d
    8-b
    9.a-true
    b-false
    10-b
    11-a
    12 a-false
    b-false
    13-c
    14-a
    15-c
    Last edited by Fendaril; December 2nd, 2009 at 03:17 PM.

Similar Threads

  1. not so simple, simple swing question box
    By wolfgar in forum AWT / Java Swing
    Replies: 2
    Last Post: November 20th, 2009, 02:47 AM
  2. Simple Form Help
    By dsen in forum Web Frameworks
    Replies: 1
    Last Post: September 8th, 2009, 11:32 PM
  3. Replies: 0
    Last Post: February 3rd, 2009, 12:15 AM

Tags for this Thread