Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@ public class CastingAndIfElseService {
//demonstration of Implicit casting from int to double
int classScore = 85;
double dClassScore = classScore;

char classGrade;
char classGrade;

// RYAN: i see implicit casting above, but I do not see any other casting in this file
// so I added the constructor below just to demonstrate it:
public CastingAndIfElseService(int classScore, int dClassScore, int classGrade){
this.classScore = classScore;
this.dClassScore = (int) dClassScore;
this.classGrade = (int) classGrade;
short test1 = (short) classScore;
byte test2 = (byte) dClassScore;
}

//public constructor with parameters
public CastingAndIfElseService(int classScore, double dClassScore, char classGrade){
Expand Down