John Held

+ Follow
since Jun 13, 2002
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Held

The following code compiles and apparently is an example of shadowing a static method. It sure looks like a static method overwriting another static method to me.
Does anyone have any insights?
public class A
public static void sM1() { System.out.println("In base static"); }
class B extends A
public static void sM1() { System.out.println("In sub static"); }

I've been studying Java using the Complete Java 2
Certification guide.
Now I'm looking at JQ+ and was working on some
garbage collection questions--a lot of them about finalize() which is only covered under the Developer section.
I'm curious if JQ+ covers material I don't really need to know.
Any opinions?
Thanks. I was able to create a sequence with midi events. If anyone knows of better descriptions of the values which need to go in various midi events (the API seems pretty dry for this information and the midi site reference is pretty feeble) let me know.
17 years ago has some examples that may be worth taking a look at.
17 years ago
Thanks Rob,
The import statement is as follows:
Any ideas on the correct way to add the
17 years ago
Ambitious I know, but I the problem I'm having
illustrates the difference between book-learning and writing real Java programs
According to the Sequence API, I can create a
new MIDI (music) sequence, add a track to it, and
then add midi events to it.
1--in spite of the right import statement, I seem
to have to add "javax.sound.midi.MidiEvent" for
the t.add statement to find the "setTick" midi function.
2--Even though Midi2 is not static, I get the message "non-static method set.Tick(l) cannot
be referenced from a static context"
Help -- code below!

public class Midi2 {
Midi2() {
Sequence seq = null;
try {seq = new Sequence(0.0f, 500);} catch (InvalidMidiDataException e)
Track t = null;
t = seq.createTrack();
long l = 500;

17 years ago
I'd like to have an alternative to Thread.sleep
which can be used as an accurate timer. Anyone
know of such a timing method?
I'm replying to my own question--found this site.
I'm still curious if anyone has some further advice.
17 years ago
I'd like to be able to create some midi sound files. Any pointers or advice?
17 years ago
It sure seems like it out to be six objects
to me. -- not an expert though.
Does anyone know how the market is in California for Java programmers?

Austen Texas? Seattle? Portland?
17 years ago
It seems like one of the difficulties in fully understanding Java is that it is difficult to find an organized list of Java's rules--and then
the exceptions to the rule.
Does anyone know of such an organized list?
Here is an example of what I'm talking about:
Rule: a switch argument can be anything smaller or equal to an int
Exception: if one of the case statements contains a number larger than the type of switch argument, we have a compiler error
byte a = 7;
switch (a) {
case 128:
System.out.println("We have a problem here.");