Computers and Technology
Computers and Technology, 05.11.2019 01:31, hii2857

What is wrong in the following code? 1 public class test { 2 public static void main(string[] args) { 3 object fruit = new fruit(); 4 object apple = (apple)fruit; 5 } 6 } 7 8 class apple extends fruit { 9 } 10 11 class fruit { 12 } object apple = (apple)fruit; causes a runtime classcastingexception.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:00, DRock4976
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen too
Answers: 2
image
Computers and Technology, 23.06.2019 12:30, Prettygirlyaya
How is the brightness of oled of the diaplay is controled
Answers: 1
image
Computers and Technology, 24.06.2019 01:30, kevin72836
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
image
Computers and Technology, 24.06.2019 08:20, brinks7994
Which type of entity describes a fundamental business aspect of a database? a. linking b. lookup c. domain d. weak
Answers: 3
Do you know the correct answer?
What is wrong in the following code? 1 public class test { 2 public static void main(string[] args)...

Questions in other subjects:

Konu
Mathematics, 14.01.2021 23:10