File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes basic doubt.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "basic doubt...." Watch "basic doubt...." New topic

basic doubt....

CAAnitha Ramesh

Joined: Mar 20, 2008
Posts: 3
Hi all,

I am new to this forum. I happened to come acroos the below code snippet and tried executing it.

class sample {
public static void main(String[] args) {
System.out.print("iexplore pen");;

It is compiling successfully and the output is normal. How does this compile?? How does JVM interpret the http statement?? Any significant reason that this sort of statement is allowed in the middle of the program??

Please note that the above code snippet does not compile if you remove the last print statement, I mean, leaving the http statement as the last statement.

Thanks and regards,
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

While this is valid, it is almost completely useless and certainly a bad idea.

It is made up of two parts: a label and a line comment eg


While labels and comments are valid, using them to display URLs is misleading and not useful.
I agree. Here's the link:
subject: basic doubt....
It's not a secret anymore!