David Harrigan

Ranch Hand
+ Follow
since Dec 12, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Harrigan

Hiya,
Is anyone else encountering problems when running weblogic 5.1 with sp9? It sometimes doesn't submit the entire page to a web browser - especially IE (using 5.5 sp1).
David.
22 years ago
Don't know if it's a good solution, but why not have another collection (ArrayList perhaps) that takes the Object Id as the key and a simple counter that is incremented whenever an object is referenced. You can then have another thread that is launched at specific times, examines the value for each entry in the collection and if is below a certain access threshold (say 50) then it removes that object from the HashMap???
David.
23 years ago
Matthew is correct. You can increment a char like a normal int. So,
char c = 'A';
c++;
will work.
Don't forget, if you want to use the char as a key in a hashmap, you need to convert it to an object first! Here is a bit of code to do so:-
--
HashMap h = new HashMap();
char c = 'A';
Character co = Character(c);
h.put(co, "Hello There!");
--
David.
23 years ago
Yeah, thanks Grant. He's right. Some minor points about speed and looks, but if you stick with "lightweight" components such as Swing provides then you'll have a consistent look and feel...
Speed, ahem, Java isn't noted for it's *speed*... :-) But as Grant rightly points out, there may be minor speed variations on platforms. Personally I only use the Sun JVM on Windows and Blackdown on Linux.
David.
23 years ago
Hiya,
There are 2 screens. Just click I AGREE to every question asked. You will know you are facing the *real* exam when your heart jumps up 30 beats, your palms get all sweaty and you begin to worry...
Go back and unmark the questions when you have examined them.
David.
I think it's still a IS-A because the class *has* to implement all of the interface methods, so the class IS-A interface type as well.
David.
Take a look here:-
http://java.sun.com/docs/books/tutorial/essential/threads/index.html
for threads...
YOu will also find information there about IO, but IMHO it's not that good.
David.
Until you are regularly scoring 75-85% consistently in all mock exams, I wouldn't even bother going for the real exam...
David.
Hiya,
I think it is very important to remember the interfaces, abstract classes and concrete classes of the Collection utilities. You should also know which type of collection you will require depending on whether you need to store data uniquely, duplicated-doesn't-matter etc...
Therefore, you need to understand about Lists, Sets, Maps, SortedSets, SortedMaps. Their abstract classes (AbstractMap, AbstractSet etc....) and some concrete implementations (LinkedList, ArrayList, TreeMap, TreeSet....etc...)
Most of this classes share the same method names (add, remove, etc..)
Take a look at the Java Tutorial online at this URL:-
http://java.sun.com/docs/books/tutorial/collections/intro/index.html
David
Nothing.
Java was designed to be platform independent. All the data types are fixed (i.e., 64bit, 32bit, 16bit, 8bit). All the input/output streams/readers work on a high level so you don't have to worry if you are running on a Unix box or a Windows box.
I develop both in Unix (GNU/Linux) and Windows and I yet to notice a difference...
David.
23 years ago
Avoid J++ like the plague. It is non-standard. Breaks the language and Microsoft have officially dropped it, instead concentrating on the Java-clone C#.
It's better to get the latest JDK from Sun (or IBM or whatever). A decent Text editor (I use Textpad 4.0) and learn from the web...
David.
23 years ago
Don't think so....I didn't get it on my exam...
I think the exam concentrates on the fundamentals of the language. The only util package I was asked on was the collections....
David.
I'll give it a shot:-
Machine code is basically binary. Your average 001110101 etc.. that instructs the machine what to do. If you had the time and patience you could write this...however, I think it would take a ***LONG*** time for you to do anything useful...It is the *only* language the computer understands...
Opcode is the next level up. It is the:-
MOV #F, 12
NEQ A0, D1
BNE AA, #F
That you may see around. You write this using a text editor, and get an assembler to convert this into machine code (the 0011001) for the computer to do something..It is easier to write in assembler (as it's often referred to) than in machine code
Bytecode are machine-independent implementations of a high-level language (Java springs to mind here) that can be transferred from one machine to another. The JVM converts the byte-code into machine-code for the computer to do something...
David
23 years ago
Consider this:-

In the first case, the JVM would need to check the condition of *both* a *and* b in order for it to evaluate the expression. However, in the second case, it looks at a, determines it's true, but in an AND condition, *both* sides of the expression need to be true for the whole thing to evaluate to true, so it checks b as well...
However, if a was false then it would stop checking at a because it doesn't matter what the value of 'b' is as the overall result will *always* be false (i.e.,
if (false && true) = false
if (false && false) = false
if (true && false) = false
if (true && true) = true
The && is a short-circuit. It allows the JVM to continue on without processing the other side of the expression since it knows what the first part of the expression is...
The best way is to write some code. Try all permutations and convince yourself of the result...
David.
23 years ago
According to JLS 2nd Edition:-
8.4.3.4
...
A compile-time error occurs if a native method is declared abstract.
...
David.