rishman toor

Greenhorn
+ Follow
since Dec 28, 2005
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by rishman toor

import java.io.*;
class �AAA^{
public static void main(String[] arg){
FileInputStream fi=new FileInputStream();
ObjectInputStream oi=new ObjectInputStream(fi);
while(!eof){
oi.writeObject(c1);
....
..
....
fi.close();
}
}
}

just reads first object and get exception class cast exception in main
18 years ago
class Car implements Serializable{
..........
}

import java.io.*;
class Carwrite{
public static void main(String[]){
Car c1=new Car(--);
Car c2=new Car(--);
Car c3=new Car(--);
FileOutputStream fo=new FileOutputStream();
ObjectOutputStream oo=new ObjectOutputStream(fo);
oo.writeObject(c1);
oo.writeObject(c2);
oo.writeObject(c3);
oo.flush();
fo.close();
}
}
When i write this code for writing the objects of a class Car i just read only last object.Will u tell me how can i read all written objects of class Car.
Thankzzzzzzzz.
18 years ago
how can i make a java executable file?
Thankz in advance
18 years ago
hi
how can i read all objects from the beginning of a file?How can i get the number of objects in a stored file?
How can i make executable java file?
Thankz
18 years ago
hi
how can i read all objects from the beginning of a file?How can i get the number of objects in a stored file?
18 years ago
I stored so many objects in a file using file output stream.but when read these objects using file input stream just find last one.how can i read all objects in an file?And how can i find that how many objects a file contained?And another question is how can i make a java exe file?
Thankz in advance.
18 years ago