Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-21-2008, 11:48 PM
AKP AKP is offline
Member
 
Join Date: May 2008
Posts: 3
Rep Power: 0
AKP is on a distinguished road
Default 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
  #2 (permalink)  
Old 05-22-2008, 02:27 AM
Member
 
Join Date: Apr 2008
Posts: 23
Rep Power: 0
theonly is on a distinguished road
Default
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, 03:55 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 6,523
Rep Power: 9
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
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.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
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.
Resources:
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.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
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.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 05-23-2008, 11:26 AM
Member
 
Join Date: May 2008
Posts: 17
Rep Power: 0
greyhat is on a distinguished road
Default
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, 11:37 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 6,523
Rep Power: 9
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
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.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
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.
Resources:
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.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
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.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 05-23-2008, 11:49 AM
Member
 
Join Date: May 2008
Posts: 17
Rep Power: 0
greyhat is on a distinguished road
Default
ya sorry for that
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 05-23-2008, 11:53 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 6,523
Rep Power: 9
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
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.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
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.
Resources:
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.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
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.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 05-23-2008, 12:06 PM
Member
 
Join Date: May 2008
Posts: 17
Rep Power: 0
greyhat is on a distinguished road
Default
ok thats fine with me
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

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

BB 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 10:26 PM
Design Patterns - Basics (I) JavaForums Java Blogs 0 02-09-2008 10:26 PM
regading jsp basics lpwing JavaServer Pages (JSP) and JSTL 0 01-21-2008 07:52 AM
Session Beans (basics) Java Tip Java Tips 0 12-28-2007 10:43 AM
Multithreading (basics) JavaForums Java Blogs 0 12-17-2007 12:21 PM


All times are GMT +2. The time now is 05:39 PM.



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