Vagisha Sharma

+ Follow
since Mar 01, 2001
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Vagisha Sharma

Printing from an unsigned applet is allowed by the java plug-in. When a print request is made it pops up a confirmation dialog after which the print job goes through on Windows. On a Mac, however, a security exception is thrown after the confirmation dialog:

The entire stack trace is copied at the end.

It appears that the applet is trying to open a connection to port 631 on localhost (Port 631 is the standard port for the IPP protocol). Usually an applet is only allowed to open a connection to the host that it came from (not localhost in this case). Therefore, the exception seems reasonable. However, when the print request is sent a second time the print job goes through! I don�t know why!

Has anyone encountered this problem on a Mac (OS 10.4.7; Java version 1.5.0_06) ? Is there a solution?

Thank you.

11 years ago
Thanks a lot for the link. The article was useful. I'm sorry I took so long to reply.

I have to develop an XML schema for some biological data and then write a tool in Java to produce a MySQL database. I found enough resources/tutorials for writing XML schemas but I don't have any idea how to go from XML Schema to MySQL database through Java.
I would appreciate your suggestions.
Congratulations Seema!
Good Luck,
16 years ago
Thank you all.
Seema thanks for answering George's question.
Denish, you will find Jane's notes here:
16 years ago
Wow! Unbelievable!
I hope you have a great summer.
16 years ago
......Maha Anna, Velmurugan, Roseanne Zhang,Cindy Glass, Jane Griscti(I found your study notes quite useful!) and all the other people who take the time to answer questions on this forum, sometimes answering the same question, posted by different people, more than once in the same day!! I have to say most of you are very patient!
I scored 96% on the test(can't believe I didn't get 100% ), and in the end I thought I knew a lot more than was required for the test!! It feels so good to be able to say that But the exam was very simple and I was probably lucky.
There has been some confusion whether strings should be put in quotes in the type-in answers. I had one of those questions and initially I didn't put quotes. But as I went on with the test I noticed that some of the options for string type questions were like....... the value of the string is "xxxx" I went back and added the quotes......and I got that question right.
For those of you who are preparing for the test, I can't tell you anything new. You know what to do.....write a lot of code, refer to JLS and API documentation. I tried to read JLS while I was going through the certification books(KM and Exam Cram) for the first time and I would get a headache after reading just two lines! But I went back to it after I had gone through the two books and written a lot of code ....and then things started to make sense! There is a LOT in JLS that you will not find in the books. You will probably not need all that information for the exam but it just feels good to know all that stuff
For the packages, don't rely on just the books. Go through the API documentation. I probably didn't get a single question on packages that I could not have answered just from the information in the books....but I was probably lucky.
The $20 for JQ+ was a good investement!
There were some tricky questions on threads. Most questions had 15 to 20 lines of code.
Thank you all once again.
I am going to enjoy myself for the next few hours....till I am forced to watch The Mummy Returns
16 years ago
Cindy is right, it does sound like a typo. Why don't you post your code here?
You have the code wrong. In the actual question it is:
class Inner {
void test() {
if (Test4.this.flag); {//NOTICE THE ;
Notice the semicolon immediately after if(condition). That is an empty statement and does nothing. The block {} after the semicolon is executed whether the condition for "if" is true or false. Therefore the given answer is correct.
However, if you compile and run the code as given in your post, it will produce no output.
[This message has been edited by Vagisha Sharma (edited March 22, 2001).]
'V' is not printed because p3 is an instance variable, not initialized until an object of the class Test8 is created.
'J', '$', and '-' are printed because variables p1 and p2 are declared static and variable p4 is declared and initialized in the main method.
Look at the comments:
public clas test8
//Instance variable p3 initialized only when object of class
//Test8 is created
Process8 p3 = new Process8('V');
public static void main(String[ ] args)
Process8 p4 = new Process8('_');
// p3 will be initialized if the following line is added
//Test8 t8 = new Test8();

//static variables p1 and p2 are initialized when class
//Test8 is loaded at runtime
static Process8 p1 = new Process8('J');
static Process8 p2 = new Process8('$');
Use the stringWidth method of class FontMetrics.
public int stringWidth(String str) returns the advance width of the characters in the specified string.
try the following code:
public void paint(Graphics g)
FontMetrics fm = g.getFontMetrics();
g.drawString(s1, 25 + fm.stringWidth(s),25);
16 years ago
Hi Sam,
Can't you use a TextArea instead of a Canvas? That should solve your problem.

16 years ago