Arif Rizwan

Greenhorn
+ Follow
since Jan 09, 2014
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Arif Rizwan

hi this is arif i am getting classCast Exception at run time following is my code.

here in the above code i am trying to get leaveid by using index i am taking a index into a String variable str and converting into integer integer.parseInt(str)

while converting String to integer i am getting a error classCast Exception how can i resolve this problem?

10 years ago
Hi my name is arif i am getting runtime Exception Saying classCastException
here is my code where i am getting classcastException.


when i run it i am getting following Exception


how can i resolve this problem can any one advice me.
10 years ago
Hi
my name is arif i am converting String to date object while converting this i am getting Run time Exception can any one advise how can i resolve this problem
here in this code i am using String tokennizer reading a data from a text file
here is my code

this is the Exception which i am getting

this is the method i am calling to convert String to date object




here is an text file which i am reading

priya Rao DBA 13-APR-60 02-JUN-92 Mahdipatnam Hyderabad 01-FEB-93 - Admin F priya M 7842236802 12348
Arif Rizwan Development 14-FEB-88 12-MAR-12 Sathya coloney Hyderabad 10-FEB-14 - Software Engineer M asdfgh Manager 7842655502 123
AFif Rizwan Development 14-FEB-88 12-MAR-12 Sathya coloney Hyderabad 10-FEB-14 - Software Engineer M asdfgh Manager 7802655502 123
Asif Rizwan Development 14-FEB-88 12-MAR-12 Sathya coloney Hyderabad 10-FEB-14 - Software Engineer M asdfgh Manager 7842631102 123
10 years ago
Hi i am Arif i am getting run time Exception while converting String to Number please any one can advice me


Here i am calling above Method convertToNumber().

this is an Exception which i am getting at Run time


10 years ago
Hi i am getting Run time Exception while converting String object to Date Object can some one please Advise



java.text.SimpleDateFormat@b9b195a0
java.text.ParseException: Unparseable date: "14-07-2012"





public static void main(String[] args) {
String time = "14-07-2012";
DateFormat df = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss");
try {
Date date = df.parse(time);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(df);
}


10 years ago