public class Test2 {
public static void main(String[] args) {
if(args.length < 2) {
System.err.println("Error !!");
System.exit(1);
}
float distance = Float.parseFloat(args[0]);
float time = Float.parseFloat(args[1]);
System.out.print("Velocity = " );
System.out.print(distance / time);
System.out.print(" m/s ");
}
}
How can I make variables constant?
Constant distance = 10;
Constant time = 5;
Thank Everyone!