Java Program - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript Java Program - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript

Breaking

Post Top Ad

Post Top Ad

Saturday, March 9, 2019

Java Program

Java Program


First Java Program-Example 1

/*This is a simple java program*/
class Example
{
  public static void main (String args[])
  {
  System.out.println (This is a simple Java program);
  }
}

Simple Java Program-Some important points

üpublic: Access specifier. main() must be made 
public, since it must be called by code defined 
outside its class.


üStatic: It is required because main() is called
 without creating an object of its class.

üString args[]: An array of objects of type String
 class. Each object of type string contains 
character string. It is used to manipulate command
 line argument.

üJava is case sensitive.

üSystem           predefined class that refers to
 system.

  out           It is static data member of System class

  println()      It is a member of out object.


JRE and JDK



üJRE: J2SE Runtime Environment

üprovides

ülibraries,

üJava virtual machine,

üother components necessary for you to run

applets and applications

üJDK: J2SE Development Kit

üincludes

üJRE

ücommand-line development tools such as 

compilers and debuggers

No comments:

Post a Comment

Post Top Ad