File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Is Watch "Is New topic
Author

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
Bartender

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


Rob
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: http://aspose.com/file-tools
 
subject: Is 'int i=1/3' is legal statement?
 
Similar Threads
arrays declarations
cast of numeric literal int
anonymous arrays
Regarding array declaration
What about arrays?