Hello, so this is my first post here. I am also a new programmer, learning java for some months now. Ok, let me go straight to the issue. I am writing a simple program for university and I stuck at a certain error from the compilation program (javac).
The program I wrote is this:
The error I am getting from the command prompt is this:Code:import java.io.*;
class vehicles{
private String number;
private char status;
private int years;
vehicles(String n, char s, int y){
number=n;
status=s;
years=n;
}
static int [] fee_calculation(vehicles.table[]){
int fees[]=new fees[table.length];
for(int i=0; i<table.length; i++){
if(status=='1')
fees[i]=200;
else if(status=='2')
fees[i]=2000;
else
fees[i]=1000;
if(years<=5)
fees[i]+=30;
else if(years<=10)
fees[i]+=60;
else if(years<=15)
fees[i]+=90;
else
fees[i]+=120;
}
return fees;
}
String get_number(){
return number;
}
}
class vehicles_demo{
public static void main(String args[]) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String n;
char s;
int y;
System.out.println("How many vehicles you want to give for calculation: ");
int how_many=Integer.parseInteger(br.readLine());
System.out.println();
vehicles table=new vehicles[how_many];
for(int i=0; i<table.length; i++){
System.out.println(i+" vehicle");
System.out.println("Type the number of the vehicle: ");
n=br.readLine();
System.out.println("Type the status of the vehicle (1=legal, 2=illegal, 3=under investigation): ");
s=(char) System.in.read();
System.out.println("Type the years the vehicle is being used: ");
y=Integer.parseInteger(br.readLine());
table[i]=new vehicles(n, s, y);
}
int fees[]=new int[table.length];
fees=vehicles.fee_calculation(table);
for(int i=0; i<table.length; i++){
System.out.println("The vehicle with the number "+table[i].get_number()+" has a fee of "+fees[i]+" euro");
System.out.println();
}
}
}
vehicles_demo.java:14: <identifier> expected
static int [] fee_calculation(vehicles.table[]){
(the pointer shows the last parenthesis)
What the hell is going on, is it a syntax error, I can't find it. Any help appreciated.

