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/06/2024 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

Crux Of The Basic Interview Question Asked Around It Professionals
Question: Explain PSVM() in Java. Answer: This question is asked from a differnet persctive. Person asking this question is looking for deep java concepts. If answer in your mind is something like...

How can everyone prepare to clear any Java interview?
Java interview your java should be much strong then J2EE. core java and Advance java is the basic foundation for Interview. Some of the topic about which you should know before going for a java interview...

Priority in TestNG
public class Priority { @Test (priority=1)public void login() {System.out.println("login");} @Testpublic void email1() {System.out.println("email1");} @Test (priority=-2)public void email2() {System.out.println("email2");} //I...
S

Sarthak C.

0 0
0

Memory
there are two type of memory (1) is primary (2)is secondary Primary is divided in two part (1) ROM (2)RAM ROM- IT is divided in three part prom, eprom, eeprom RAM- RAM IS DIVIDED IN TWO PART SRAM...
B

How to create a Singleton class?
How to create a Singleton class: Q) What is a singleton class? A) In simple words, a singleton class is a class which can have only one instance at any point of time throughout the application and provides...
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