There are two methods in the Externalizable interface. You have to implement these two methods in order to make your class externalizable. These two methods are readExternal() and writeExternal().
When you use Serializable interface, your class is serialized automatically by default. But you can override writeObject() and readObject()two methods to control more complex object serailization process.
Latest Answer: Java gives you control over the serialization process through the java.io.Externalizable interface. The java.io.Externalizable interface extends the java.io.SerialiJava gives you control over the serialization process through the java.io.Externalizable ...
Constructing a StringIf you are constructing a string with several appends, it may be more efficient to construct it using a StringBuffer and then convert it to an immutable String object.StringBuffer
String string = "aString";// First occurrence.int index = string.indexOf('S'); // 1// Last occurrence.index = string.lastIndexOf('i'); // 4// Not found.index = string.lastIndexOf('z');
// Replace all occurrences of 'a' with 'o'String newString = string.replace('a', 'o');Replacing Substrings in a Stringstatic String replace(String str,String pattern,
Consider the following bean: package bar;public class FooBean {public FooBean(SomeObj arg) {...}//getters and setters here}The only way you can instantiate this bean within your JSP page is to use a scriptlet.
View page << Previous 1 2 3 [4]

Go Top