UrbanPro
true

Learn IT Courses from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Java complete reference-herbert schildt

Charmy M.
03 Jun 0 0

Sample program:

class Sample {

        public static void main(String args[ ] ) {

             System.out.println("Sample") ;

          }

}

Program explanation:

Keyword used in line 1- class

The name of the class(Identifier) - Sample

Class enclosed in -  {  }

Program execution begins with- main() 

Access modifier-public

static-allows main() method to be called without having an instance of class. 

void-main() doesn't have a return value. 

main() - called when java application begins execution

String args[]- args is a parameter-array of instances of class String

args- receives command line arguments. 

System- predefined class

out - output stream connected to console

Println- displays strings passed to it. 

;  - semicolon ends the statement. 

 

 

 

 

 

 

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You

Sap Hana: How To Start Hana Studio & Start Hana System To Understand The Components And Views?
D-Click on SAP HANA Studio from the desktop. Use the login your user name and password which you got from the system adminstrator. Once login in to HANA system. Click on Add System if need to add...

Why Should We Learn Java Language?
Most of starters has confusion today that which of the programming language should be chosen to work on. It totally depends upon your need. As per my opinion, if you want to grow your career in IT industry...

Most Important Java Interview Topics
Dear All, I am here to help on java interview preparation for fresher and experienced people, please get in touch with me for further details. All interview preparation will be with unique teaching style...

ClassNotFoundException vs NoClassDefFoundError
ClassNotFoundException NoClassDefFoundError It is an exception and happens due to programmer’s mistake and can be recovered by updating the code. Thrown when an application tries...

IP ADDRESS
IP ADDRESS: It denotes the host to communicate other host so IPaddress used for identification. It is 32 bit logical address. It divided in two category. Dynamic IP address: It provides IP address is...
B
X

Looking for IT Courses Classes?

The best tutors for IT Courses Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn IT Courses with the Best Tutors

The best Tutors for IT Courses Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more