I wrote this simple piece of code to find the number in the given array of Integers.The program works fine although it shows a couple of errors when i modify it a little bit.
public class DemoLabel{...
Type: Posts; User: thebenman
I wrote this simple piece of code to find the number in the given array of Integers.The program works fine although it shows a couple of errors when i modify it a little bit.
public class DemoLabel{...
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;...
Yeah,Thanks that helped a lot.It now works fine.But i wanted to add more functionality by asking the user if he wanted to modify them once more,so i added a do..while loop.However when i wanted to...
Hey,
I was trying to play around a little bit after learning creating multiple classes and stuff.However,i encountered a strange problem with reading a value from the user and then storing it...