Question: Please help me in finding the best answer Consider the following code segment and class. Game gamel new Game (5) gamel play) System.out.printin (gamel.getscoreO) Game
Please help me in finding the best answer

Consider the following code segment and class. Game gamel new Game (5) gamel play) System.out.printin (gamel.getscoreO) Game game2 new Game(); game2 play) System.out.printin (game2.getScore)) class Game private int score private int level; public Game (int lev) score-0i levellev public void play) score (int) (Math.random) 10000) scorescore leveli public int getscore () return score What is printed as a result of executing the code segment? A compiler error message an illegalCastingException error message O an integer value x, such that 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
