contestada

Class hello Sarah{
Pubic static void(“hello Sarah”)
Name=input(“hello Sarah”)
Print(“hello Sarah”).

Respuesta :

Answer:

class helloSarah {

public static void main(String [] args) {

Name = "Hello Sarah";

System.out.print(Name);

}

}

Explanation:

The question seem incomplete; However, since the program is incorrect, I'll assume the question is to correct the given code;

The program segment was written in Java and the correct program is in the answer section

See bold texts for line by line explanation

This line declares the class name

class helloSarah {

This line declares the main method of the program

public static void main(String [] args) {

This line initializes string variable Name

String Name = "Hello Sarah";

This line prints the initialized variable

System.out.print(Name);

}

}

Answer:

class helloSarah {

public static void main(String [] args) {

Name = "Hello Sarah";

System.out.print(Name);

]

Explanation: