Okay this seems really simple, but I cant find a way around it!
I want to input using the command line a string in the form of "10-23-2001", and then split that and put the values in 3 different integers so I can pass it through another method/function. This is what I got:
If i just output dateString[0], it does come up with the right number, but converting it to an integer seems to give me an incompatible type error. Any way around this?PHP Code:
public static void main(String dateStringInput){
String[] dateString = dateStringInput.split("-");
int dayInput = dateString[0];
}
And btw, I NEED the input as a string because of a requirement.
Hope someone could shed some light on this.
Thanks!
EDIT:
Sorry guys, I worked it out (found a topic for it on here) .... Any way to delete this?