fork download
  1. class Tutorial {
  2. String tutName;
  3. int tutNo;
  4. public static void main(String[] args)
  5. {
  6. Tutorial tut = new Tutorial();
  7. Tutorial tut1= new Tutorial();
  8. tut.tutName="Java";
  9. tut.tutNo=2;
  10. System.out.print("Tutorial Number " + tut.tutNo + "is " +tut.tutName);
  11. System.out.print("Tutorial Number " + tut1.tutNo + "is " +tut1.tutName);
  12. }
  13. }
Success #stdin #stdout 0.13s 57440KB
stdin
Standard input is empty
stdout
Tutorial Number 2is JavaTutorial Number 0is null