Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Originally posted by Jamal Hasanov:
Very good design and user friendly web site.
Good luck in your business.
Jamal Hasanov
www.j-think.com
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Originally posted by Brian Lugo:
Hi Sun!
I believe there is a mistake in Q49 in test2.
The correct answer is 12 bytes due to the seek before //1.
Feel free to correct me if I am wrong,
Brian
PS - Never mind the question asks for how many bytes are written to the file and not the length of the file!!!
[ June 04, 2002: Message edited by: Brian Lugo ]
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
Originally posted by Thiru Thangavelu:
Can you explain me how it is 12 bytes?
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
Originally posted by Thiru Thangavelu:
Just curious to know how it has written the characters but the output is junk characters.. Can you explain how I can see the output(may be ascii charaters)?
import java.io.*;
public class Test {
public static void main(String[] args)
{
try
{
File f = new File("test.txt");
RandomAccessFile r = new RandomAccessFile(f, "rw");
r.writeChar((char)65);
r.writeInt(30000);
r.writeInt(3);
r.seek(4);
r.writeLong(5); //1
r.close();
RandomAccessFile r1 = new RandomAccessFile(f, "r");
for(int i=0;i<r1.length();i++)
System.out.print((char)r1.read());
r1.close();
}
catch(Exception e) {
}
}
}
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
Originally posted by Thiru Thangavelu:
Hi Guoqiao Sun,
I got 74%,74%, 57% on your 1st, 2nd, 3rd exams respetively(You can see my name on the list of people who has taken the exam). Am i ready for the exam? Still I feel my score is less. What do u suggest?
[ June 10, 2002: Message edited by: Thiru Thangavelu ]
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Originally posted by Valentin Crettaz:
Keep on going SUn... you've been doing a good job![]()
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |