164k views
1 vote
Write code that outputs variable numTickets. End with a new line (Java) output 2 and 5

1 Answer

2 votes

Answer:

public class Main {

public static void main(String[] args) {

int numTickets = 2;

System.out.println(numTickets);

numTickets = 5;

System.out.println(numTickets);

}

}

User John Rix
by
7.7k points