54.3k views
2 votes
Class hello Sarah{

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

User Droebi
by
3.7k points

2 Answers

7 votes

Answer:

class helloSarah {

public static void main(String [] args) {

Name = "Hello Sarah";

System.out.print(Name);

]

Step-by-step explanation:

User Handler
by
4.3k points
7 votes

Answer:

class helloSarah {

public static void main(String [] args) {

Name = "Hello Sarah";

System.out.print(Name);

}

}

Step-by-step 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);

}

}

User VictorySaber
by
4.3k points