Thanks a lot.Is it mandatory for all the executable statements to be inside a constructor or method ? unlike in C/C++ ? I did put all the executable statements inside the constructor for car class.
...
Type: Posts; User: thebenman
Thanks a lot.Is it mandatory for all the executable statements to be inside a constructor or method ? unlike in C/C++ ? I did put all the executable statements inside the constructor for car class.
...
I'll keep the naming convention in mind the next time :)
The errors from car.java
D:\java>javac car.java
car.java:4: error: <identifier> expected
System.out.println("Enter the number of...
hey i was leaning inheritance and tried to implement it in Java.This is my base class vehicl.java
public class vehicle{
private int topSpeed;
private int cubicCap;
private String modelName;...