Im guessing this is the method you want:
public static Date toDate(String str){
try{
String[] a = str.split("/");
int y = Integer.parseInt(a[2]);
int d = Integer.parseInt(a[1]);
int m = Integer.parseInt(a[0]);
return new Date(y,m,d);
} catch(Exception evt){
return null;
}
}
godzab
Junior Poster in Training
65 posts since Jun 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0
So im guessing this method is supposed to create a new Date() object through the method right?
godzab
Junior Poster in Training
65 posts since Jun 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0
Try using System.load(".dll name");
like this:
static
{
System.loadLibrary("somedll");
}
godzab
Junior Poster in Training
65 posts since Jun 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0
If your problem is solved, mark it as solved.
godzab
Junior Poster in Training
65 posts since Jun 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0
Its like a main menu in a movie.
ex.
Scanner s = new Scanner(System.in);
System.out.print("Would you like to \n 1.Eat\n 2.Poop\n 3.or sleep"); // This is the menu-driven part
String input = s.nextLine();
switch(input) //you can only switch strings in JDK7
{
//code goes here
}
godzab
Junior Poster in Training
65 posts since Jun 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0
Does this mean we can access the user32.dll file?
godzab
Junior Poster in Training
65 posts since Jun 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0
godzab
Junior Poster in Training
65 posts since Jun 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0