Solved

The Class Ticket Has Been Coded as Follows

Question 108

Essay

The class Ticket has been coded as follows:
public class Ticket
{
private double price;
private char service;
public Ticket( double newPrice, char newService )
{
setPrice( newPrice );
setService( newService );
}
}
Consider the following constant of class Ticket:
public static char DEFAULT_SERVICE = 'B';
In a client class and inside main, write a statement to output the value of the above constant.

Correct Answer:

verifed

Verified

System.out.println( ...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions