+ 1

Problem

i am having problem in my code public class Vehicle{ String color; void Sound_two() { System.out.println("beep") ; } } class Defining { public static void main(String[ ] args) { Vehicle car=new Vehicle(); car.color = "red"; } } i should get the output beep but it doesnt

28th May 2017, 3:45 AM
Gaurab Khatry
Gaurab Khatry - avatar
1 Answer