Results 1 to 9 of 9
  1. #1
    javalikeaboss is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Help with multiple choice questions :)

    I'm currently revising for a java test and wondered if you guys could help me out :)

    Consider the method in the line of code below. Which statement is true?
    Button. addActionListener (this);


    A ‘this’ refers to the button that is to be used
    B ‘this’ refers to the procedure call add Action Listener
    C ‘this’ is a hidden pointer to the AWT
    D ‘this’ refers to this applet


    Public class member Exception extends Exception { } and


    A defines the Exception class and required methods to deal with all
    exceptions
    B extends the exception class to provide methods not covered by the standard
    library
    C extends the exception class to provide handlers for exceptions raised in
    your code
    D extends the exception message text.

    The keyword super is used to:

    A permit polymorphism in inheriting classes
    B access a member function of the base class
    C prevent access to data numbers in the base class
    D protect data members in the base class so that they can be accessed by, but not
    changed by, inheriting classes

    10. The Flow Layout Manager?

    A Sets the size of the GUI Frame
    B Allows the programmer complete control over GUI object placement.
    C Organises GUI objects in the sequence in which they are specified
    D Sets the size of Panel Objects.

    11. Consider the Super Class. Which statement is true?

    A Super is a keyword NOT a Class
    B The Super Class Is the Base Class
    C The Base Class Extends the Super Class
    D The Super Class Extends the Base Class

    13. Consider The C++ Enum Type. Which statement is true?
    A Java supports Enums For Compatibility.
    B Java Does not support the Enum type.
    C In Java Enums are implicit to the compiler.
    D Java supports Enums in header files.

    15. Consider the Swing API. Which statement is true?
    A Swing provides access to all the Microsoft windows API calls
    B Swing relies on the operating system for its functionality
    C Swing is a lightweight, limited function API
    D Swing is largely operating system independent providing a full range of
    Graphics User Interface APIs.

    19. A Big decimal has a maximum value of approximately?
    A 4294967296
    B 2^128
    C 9*10^4294967296
    D 10^32676



    Is it A,B,C OR D for each question?

    Thanks again :)

  2. #2
    javalikeaboss is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Maximum value for a big decimal in java???

    What is the maximum value for a big decimal approximately?

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,270
    Rep Power
    25

    Default Re: Help with multiple choice questions :)

    You forgot to post your answers with the reasons you chose them.
    If you don't understand my response, don't ignore it, ask a question.

  4. #4
    javalikeaboss is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Re: Help with multiple choice questions :)

    Consider the method in the line of code below. Which statement is true?
    Button. addActionListener (this);


    My answer B - because 'this' is what is happening when the button is clicked?

    Public class member Exception extends Exception { } and

    My answer C - because it will allow typos to be handled?

    The keyword super is used to:

    My answer D - because it allows you to access data in the base class but you cannot change what is in the base class?

    10. The Flow Layout Manager?

    My answer C - because it puts objects in sequence, then puts on next line like paragraphing?

    11. Consider the Super Class. Which statement is true?

    My answer A - because super is not a class - I think it is a keyword?

    13. Consider The C++ Enum Type. Which statement is true?

    My answer A - because Java did not use to support Enums but now it does for compatibility reasons?

    15. Consider the Swing API. Which statement is true?

    My answer D - because you can use it on different operating systems and it provides many features.

    19. A Big decimal has a maximum value of approximately?

    My answer A - because a big decimal consists of an arbitrary precision integer unscaled value and a 32-bit integer scale?


    Are these explanations and answers right? thanks

  5. #5
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: Maximum value for a big decimal in java???

    Approximately infinity.

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,309
    Blog Entries
    7
    Rep Power
    20

    Default Re: Maximum value for a big decimal in java???

    Quote Originally Posted by pbrockway2 View Post
    Approximately infinity.
    Nah, not even close ;-)

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    javalikeaboss is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Re: Maximum value for a big decimal in java???

    Thanks for the reply :)

    But I have this question i need to answer...

    19. A Big decimal has a maximum value of approximately?
    A 4294967296
    B 2^128
    C 9*10^4294967296
    D 10^32676

    I am not sure which one is correct as I have searched everywhere and I get responses like 'infinity' or 'depends on your computer memory'.
    Please help :)

  8. #8
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: Maximum value for a big decimal in java???

    I'd go with C - which is approximately equal to infinity (although not close).

    What do the Javadocs say? The Jvm spec? The compiler? The runtime?

  9. #9
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Help with multiple choice questions :)

    In future, don't ask the same question in more than one thread. I've merged the two threads.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 4
    Last Post: 01-20-2012, 09:43 AM
  2. Replies: 4
    Last Post: 07-19-2011, 11:07 PM
  3. Add a question with multiple choice answer
    By pink123 in forum AWT / Swing
    Replies: 6
    Last Post: 03-04-2011, 05:45 AM
  4. How to save the value for multiple choice answers
    By pink123 in forum AWT / Swing
    Replies: 1
    Last Post: 03-04-2011, 05:44 AM
  5. Need help with T/F and Multiple Choice
    By sayso36 in forum Advanced Java
    Replies: 0
    Last Post: 03-12-2008, 04:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •