I'm doing a java project where one of it's parts is to add college courses to an arraylist. This college courses has their class code like ccom 3001, how many credits does that class have and the complete name of the course, like Programming I etc.
The only thing I want to know is how to read a complete line and store it in variables. For example, I want the ccom part in one variable, the number 3001 in one variable, the credits in another variable and the name of the course in another variable. I'm pretty sure I can do the other part of the project but this is where I'm stuck. Any tips?
My file has it's courses like this (just an example):
ccom 3001 3 Programming I
ccom 3002 3 Programming II
ccom 4005 3 Data Structures