Two Laptop Bag
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Is 'int i=1/3' is legal statement? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Is Watch "Is New topic

Is 'int i=1/3' is legal statement?

WiLL Tao
Ranch Hand

Joined: Dec 14, 2001
Posts: 56
Sorry for this stupid question.

i think this is legal statement,but the answer is negative(from one of mock questions.)
someone can affirm it?
Thanks .

Thank Folks who <b>Make Sense</b> here.<br />SCJP Platform 2
Rob Ross

Joined: Jan 07, 2002
Posts: 2205
What happened when you tried to compile it?

SCJP 1.4
WiLL Tao
Ranch Hand

Joined: Dec 14, 2001
Posts: 56
compile and run no problem,Of course;
i said only for affirm.
Thanks Rob reply.
Nazmul Huda Sarkar
Ranch Hand

Joined: Feb 01, 2002
Posts: 317
Yes...its a correct statement... i is assigned with 0
Sometimes don't relies on mock qiestion. I found so many mistake there. Try to apply self-knowledge and write as many code as possible to develop your knowledgebase.
[ April 15, 2002: Message edited by: Md. Nazmul Huda Sarkar ]

Nazmul<br />SCJP,SCWCD,IBM OOAD with UML
I agree. Here's the link:
subject: Is 'int i=1/3' is legal statement?
It's not a secret anymore!