Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Input
Car Model
Car Type
Car cost price
Insurance type

Input should be accepted with following command line options:

-model
-type
-price
-insuranceType

What I have tried:

Watching command line arguments videos on youtube and googling
Posted
Updated 14-Mar-22 10:20am
v3

1 solution

Command line arguments are passed to your Main method via an (option) array of strings - they are always strings, so if one of them needs to be a number, you have to convert that yourself, the system won't do that for you.
See here: Java - parseInt() Method[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900