Computer Science, asked by abha9258, 5 hours ago

Write a program in Java to display your School's name, your name, class & section in three different lines.

Answers

Answered by atrs7391
1

class print {

// Class name

  public static void main (String[] args) {

  // Declaring Main method

      System.out.println("Your-School's-Name-Here");

     // Printing school's name (replace this with your school's name)

      System.out.println("Your-Name-Here");

     // Printing name (replace this with your name)

      System.out.println("Your-Class-Here");

     // Printing class (replace this with your class)

      System.out.println("Your-Section-Here");

     // Printing section (replace this with your section)

  }

}

------------

The lines starting with // are comments line which are ignored by the computer. You can remove those after replacing with your details in the printing statements. (i.e. System.out.println())

Similar questions