Frank Tamminga

Greenhorn
+ Follow
since Feb 21, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Frank Tamminga

I can't find anything about the 310-500 exam. According to my resources there is only one 'Certified Java Programmer JDK2 exam', 310-025.
From 'Java In A Nutshell'


One common use of static initializers is for classes that implement native methods - e.g., methods written in C. The static initializer for such a class should call System.load() or System.loadLibrary() to read in the native library that implements these native methods.


In other words:
-1 * -1 = 1
-10 * -1 = 10
-100 * -1 = 100
-10000000000000000000000 * -1 = 10000000000000000000000
-Infinity * -1 = Infinity
Short answer; No, it doesn't
Confirmed, Win2000 jdk 1.2
But, my own calculator and the Windows calculator give the same results. Sure it is an error?
I am writing a programm which must replace a Dos program.
Now our customers are used to 'Enter' to the next field. All Java 'look and feel's use the Tab to go to the next field.
We have to offer an alternative. At least for the numeric Enter-key.
Does anyone know a way how to 'tweak' the look and feel so that the Enter-key simulates a Tab.
I was thinking of extending the controls used, catching the keyboard events and then, let's say, throwing a new event if the key is an Enter. But, how do I do the latter?
24 years ago
What JVM do you use?
My JVM makes it print 'Infinity' which is correct.
(JVM 1.2.1)
In a mock exam I came accross this:
'An anomymous inner class is allways assumed to extend Oblect'
I thought it to be right. But no. Why?
In my opinion all classes extend Object...
It looks quite weird doesn't it?
But it is not that difficult.
Method() takes two StringBuffer args. These are copies of the original references to the objects created in the body of main.
In method() you change the object referred to as s1.
Now you assign the temporal reference s1 to s2.
Nice, but it is only a reference. Not the object.
When you leave method(), the original s2 still referres to the original object.
I hope I cleared it out...
[This message has been edited by Frank Tamminga (edited March 28, 2000).]
The 'toString()' method of a character will return the String representation of the character. So, if you initialize a character like:
char c = 57;
a '9' will be returned.
It is just another way to initialize characters by their number.
The number you try to get is not a normal character. All characters beneath 32 are special (antique) control characters.
Most of them don't return anything (usefull).
f.e. The BELL (7) character made a printer make a bell sound.
The main()method without arguments is indeed valid. It is semanticly perfectly correct. But: This method will never be called since Java will make a call to the main( String [] args ) version.
'The Complete Java 2 Certification Study Guide' states that the GridBagLayout will not be covered in the exam.
Watch out! It is!
I think I lost two question because of this!
I guess I was half asleep when I posted the message. I think you know that funny sensation when your cheecks begin to tinkle and start mimicing a traffic light?
Ofcourse, a constructor cannot be static. It is madness.
I somehow i confused it with private.
A private constructor is legal and can be used to implement a Singleton.
Sorry.
Bigmouth out...
24 years ago
Hi There,
One of the questions in the round up game is:

You claim it is not possible.
For your information, IT IS, and it can be very usefull. Ever heard about the Singleton pattern?
With this pattern you guarantee only a single instance of a class.
Interrested? Let me know, I will give some source.
[This message has been edited by Frank Tamminga (edited February 21, 2000).]
[This message has been edited by Frank Tamminga (edited February 21, 2000).]
24 years ago