0

I can't run "movie ticket" on my eclipse

I run it on my eclipse but it doesn't work

15th Nov 2022, 11:38 AM
Nguyen Thi Thao
Nguyen Thi Thao - avatar
10 ответов
+ 2
Please code attempt?
15th Nov 2022, 12:19 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 1
What exact error you got
15th Nov 2022, 4:19 PM
Ayush Pandey
Ayush Pandey - avatar
+ 1
Thank you so much!
15th Nov 2022, 5:48 PM
Nguyen Thi Thao
Nguyen Thi Thao - avatar
+ 1
You help me a lot
15th Nov 2022, 5:48 PM
Nguyen Thi Thao
Nguyen Thi Thao - avatar
0
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner read = new Scanner(System.in); String movie = read.nextLine(); int row = read.nextInt(); int seat = read.nextInt(); Ticket ticket = new Ticket(movie, row, seat); System.out.println("Movie: " + ticket.getMovie()); System.out.println("Row: " + ticket.getRow()); System.out.println("Seat: " + ticket.getSeat()); } } class Ticket { private String movie; private int row; private int seat; //complete the constructor public Ticket(String movie,int row,int seat) { this.movie= movie; this.row=row; this.seat=seat; } public String getMovie() { return movie; } public int getRow() { return row; } public int getSeat() { return seat; } }
15th Nov 2022, 12:20 PM
Nguyen Thi Thao
Nguyen Thi Thao - avatar
0
I can't run it and i don't know why
15th Nov 2022, 5:32 PM
Nguyen Thi Thao
Nguyen Thi Thao - avatar
0
Please share the code so we can easily understand what's your error or doubt.
15th Nov 2022, 5:34 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
0
I share it above
15th Nov 2022, 5:35 PM
Nguyen Thi Thao
Nguyen Thi Thao - avatar
15th Nov 2022, 5:50 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
0
Welcome 😊
15th Nov 2022, 5:50 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar