This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!

Will Carpenter

Greenhorn
+ Follow
since Mar 17, 2004
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 Will Carpenter

Just bought a laptop and I need suggestions for a Java IDE to load on it, preferrably free or lo-cost. I used CodeWarrior on my desktop, but don't have the CDs for CodeWarrior any more.
Now that I've passed the SCJP Certification Exam, which of the Developer Exams should I try for?

Which of the above is the easiest?

Which of the above is in the most demand, career-wise?
17 years ago
Assuming that the exam you are referring to is the SJCP exam, the best two are the Exam Prep book by Kathy Sierra(Java Ranch's founder)/Bert Bates and the one by Roberts.

Make sure when you buy the book, that it is for the current version of the exam: Version 1.4 which is Exam CX-210-035.

The first time I took the exam, I made the mistake of buying the Roberts book for Version 1.2. Failed by three questions. (I'm not blaming the book!) Bought Sierra/Bates book and made a 70.
Now that I've passed the SCJP exam, which should I take next? SCJD? Web Component Developer? Business Component Developer? or Enterprise Architect?

Which of the above is in the most demand (will get me the most money)?

Which of the above is the easiest?

Is the SCJP really harder than the rest?
Do your answers to the survey that you take just before the exam (where you are asked to rate yourself on various aspects of Java)in anyway effect the kind of questions you are asked? In other words, if I lie and say I'm an expert in all areas, am I going to get harder questions?
Never mind; I did a "Search" and found it...
char c = 7;
System.out.print(c);
17 years ago
I thought that if I System.out.print(what goes here)
I should hear a "Beep"?
17 years ago
I'm reading a file...if the input is a 55, I want to write a 37 to a second file.
....but the way you explain it, that's not doable since what I'm actually writing will be "0000 0011 0111" anyway....
17 years ago
Is there a method that returns a hexidecimal representation of an integer that isn't a string?
If I said: int i = 55;
someMethod(i);
and I would get back 37?
(Integer.toHexString won't work since that returns a String, not a number)
17 years ago
Thanks Mike!
I changed all of my FileOutputStreams to FileWriters (and FileInputStreams to FileReaders) and that gave me access to a write() method that writes Strings!
17 years ago
Thanks, Stan; but I tried
String s = Integer.toHexString(i);
already, but when I tried
fou.write(s);
that didn't work, because write() won't take a string as an arg;
is there a method that returns a hex as anything other than a String?
17 years ago
I'm trying to read a character from an input file, translate it to hex and write the hex characters to an output file. Any suggestions?

What I have so far
import java.io.*;
class TrivialApplication
{ public static void main(String args[])
{
int i;
String inf = "p3in.txt";
String ouf = "pout.txt";
FileInputStream fin;
FileOutputStream fou;

try
{ fin = new FileInputStream(inf);//set up input file
}
catch(FileNotFoundException fnf)
{ System.out.println(inf);
return;
}

try
{ fou = new FileOutputStream(ouf);//set up output file
}
catch(FileNotFoundException fnf)
{ System.out.println(fnf);
return;
}

try
{
do
{
i = fin.read(); //read a char in; write a char out
if(i != -1)
{
???;

fou.write(?);
}
}
while(i != -1);
}
catch(IOException ioe)
{ System.out.println("File error");
}
fin.close();
fou.close();
}
}
17 years ago
Awesome! thanks folks!
For those who had trouble following:
Here's the output: Sat Apr 10 2004
Given this code:
String eDate = "04 10 04";
try
{
Date fDate;
fDate = new SimpleDateFormat("MM dd yy").parse(eDate);
SimpleDateFormat sdf;
sdf = new SimpleDateFormat("EEE MMMMMMMMM dd yyyy");
System.out.println(sdf.format(fDate));
}
catch(ParseException pex)
{ System.out.println(pex);
}
17 years ago
Great sev and Dirk, that was very helpful!
Just one more thing:
The following code produces this output: Sat Apr 10 00:00:00 EDT 2004
Any idea how I could get rid of the "00:00:00 EDT"?

[ April 10, 2004: Message edited by: Dirk Schreckmann ]
17 years ago
This place is great!
Is there a method that I can pass the String "100404" or "10/04/04", (UK Style dates) and get back "Saturday, April 10, 2004" (US Style date)
17 years ago