What is serializable interface?
Answers were Sorted based on User's Feedback
Answer / manish mathur
Serializable interface is used to create classes which
enable the transfer of any binary object over a
communication channel by transferring all the data of the
object in a byte by byte manner.
| Is This Answer Correct ? | 94 Yes | 11 No |
Answer / ravikiran(aptech mumbai)
serializable interface is a marker interface which has no
methods at all
| Is This Answer Correct ? | 64 Yes | 8 No |
Answer / manish mathur(a3logics ,jaipur
Serialization is the process of writing complete state of
java object into output stream, that stream can be file or
byte array or stream associated with TCP/IP socket.
| Is This Answer Correct ? | 41 Yes | 11 No |
Answer / prakash
serialization is the interface that convert object into byte
stream. and this objects saved to local discs by
ObjectOutputStream and ObjectInputStream.and this Object can
be send over the network.
| Is This Answer Correct ? | 23 Yes | 8 No |
Answer / narendravarma mallapuraju
Serializable interface is implemented by a class ,whose
objects state can be saved into any outputstream .This is
mainly useful in RMI[Remote Method Invocation] .
| Is This Answer Correct ? | 19 Yes | 8 No |
Answer / murugan
serialization is the interface, which is used to serialize
(convert object into byte )the object, we can use this in
the situation for result pass over to any medium like
output stream,writer,bytearrayouputstream (and also persist
into stable storage).
| Is This Answer Correct ? | 16 Yes | 6 No |
Answer / atul singhal
Serializable is an Interface, which is used to convert an
object into byte, whose objects state can be saved into any
local disc by ObjectOutputStream and ObjectInputStream.
This byte form of an object will used to transfer over the
Network. This is mainly used in RMI.
| Is This Answer Correct ? | 10 Yes | 0 No |
Answer / pankaj
when we are supposed to convert our object in to byte form
to save in some location and then use on a network.
| Is This Answer Correct ? | 10 Yes | 6 No |
Answer / kanhaiya kumar
It save the state of the object in persistent(where we can
save data without Database. like- disc or pen drive etc..)
area..
| Is This Answer Correct ? | 0 Yes | 0 No |
What are local variables?
What are the problems faced by java programmers who don't use layout managers?
Explain public static void main(string args[]) in java.
How do you compare objects in java?
What is an example of character?
what is object type casting? give some example with related?
What are Access Specifiers and Access Modifiers.
The following program reads data (details of students) from a file named students.txt and converts it into e-mail addresses. The results are written to a file named studentemail.txt. students.txt consists of a number of lines, each containing the data of a student in colon delimited format: Last Name:First Name:Student Number Each input record is converted to an e-mail address and written to studentemail.txt in the following format: the first character of the last name + the first character of the first name + the last four digits of the student number + “@myunisa.ac.za” import java.io.*; public class EmailConverter { public static void main(String[] args) throws IOException { BufferedReader input = new BufferedReader(new FileReader ("students.txt")); PrintWriter output = new PrintWriter(new FileWriter ("studentemail.txt")); String line = input.readLine(); while (line != null) { // Extract the information for each student String[] items = line.split(":"); // Generate the email address String email = "" + items[0].charAt(0) + items[1].charAt(0) + items[2].substring(4,8) + "@myunisa.ac.za"; email = email.toLowerCase(); // Output output.println(email); line = input.readLine(); } input.close(); output.close(); } } Rewrite the class so that it handles possible errors that may occur. In particular, it should do the following: • It should catch at least three appropriate exceptions that might occur, and display suitable messages. • At this stage, the program will not run correctly if there is an empty line in the input file. Change the program so that if an empty line is encountered, an exception is thrown and the empty line is ignored. This exception should be handled with the display of a suitable error message. • Before the e-mail address is added to the output file, check if the student number has 8 digits. If not, throw an InvalidFormatException (which the program should not handle itself)
What is the middleware?
What does it mean to flush a file?
Explain the differences between static and dynamic variables?
What is difference between module and function?