Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-22-2008, 12:48 AM
AKP AKP is offline
Member
 
Join Date: May 2008
Posts: 3
AKP is on a distinguished road
Basics
Can any one explain the following lines in java programming :

public static void main(String args[])

System.out.println(" ");
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-22-2008, 03:27 AM
Member
 
Join Date: Apr 2008
Posts: 23
theonly is on a distinguished road
Ok

public static void main(String args[]) = the beginning of the main body(front end) of your program.

System.out.print(""); = prints whatever is in between " " to the screen
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-22-2008, 04:55 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,039
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Code:
public static void main(String args[])
This is the entry point of any Java class. We called it as main method. (A function defined in a Java class as method) Without a main method you can't run your Java class directly.

Code:
System.out.println(" ");
Print a line of text(a string in Java) to the console and place the cursor on the next line. If you used print() it's not place the cursor on the next line.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 05-23-2008, 12:26 PM
Member
 
Join Date: May 2008
Posts: 17
greyhat is on a distinguished road
Quote:
public static void main(String args[])
This describes the main method and what the program actually does. the program runs from here
Quote:
System.out.println("")
This outputs a string on the screen.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 05-23-2008, 12:37 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,039
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Quote:
Originally Posted by greyhat View Post
on the screen.
Actually to the console. Different OS has different consoles.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 05-23-2008, 12:49 PM
Member
 
Join Date: May 2008
Posts: 17
greyhat is on a distinguished road
ya sorry for that
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 05-23-2008, 12:53 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,039
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Just poinitng to the correct terminology my friend.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 05-23-2008, 01:06 PM
Member
 
Join Date: May 2008
Posts: 17
greyhat is on a distinguished road
ok thats fine with me
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Design Patterns - Basics (II) JavaForums Java Blogs 0 02-09-2008 11:26 PM
Design Patterns - Basics (I) JavaForums Java Blogs 0 02-09-2008 11:26 PM
regading jsp basics lpwing JavaServer Pages (JSP) and JSTL 0 01-21-2008 08:52 AM
Session Beans (basics) Java Tip Java Tips 0 12-28-2007 11:43 AM
Multithreading (basics) JavaForums Java Blogs 0 12-17-2007 01:21 PM


All times are GMT +3. The time now is 08:18 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org