Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The print("aString") method prints just the string "aString", but does not move the cursor to a
new line. Hence, subsequent printing instructions will print on the same line.
The println("aString") method prints the string "aString" and moves the cursor to a new line
Program 1:
class Os
int rollno;
String name;
rollno=r;
name=n;
void displayInformation()
//System.out.println(rollno);
//System.out.println(name);
class Student
{
Os s1=new Os();
Os s2=new Os();
s1.insertRecord(111,"Karan");
s2.insertRecord(222,"Aryan");
s1.displayInformation();
s2.displayInformation();
}
/*
How to Run:
G:\javaaac>javac cla.java
*/
import java.io.*;
name=args[0];
a=Integer.parseInt(args[1]);
b=Integer.parseInt(args[2]);
c=a+b;