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 :)
Maximum value for a big decimal in java???
What is the maximum value for a big decimal approximately?
Re: Help with multiple choice questions :)
You forgot to post your answers with the reasons you chose them.
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
Re: Maximum value for a big decimal in java???
Re: Maximum value for a big decimal in java???
Quote:
Originally Posted by
pbrockway2
Approximately infinity.
Nah, not even close ;-)
kind regards,
Jos
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 :)
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?
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