• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to achieve Externalization  RSS feed

 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

How to achieve Externalization in our java programme.
Like i have my program :

public class ExternalizationTest
{
public static void main(String[] args)
{
String s = "ram";
}
}

what all should i use to achieve externalization

Thanks
Regards
Gaurav
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By "externalization", do you mean "getting an external representation"? Those are performed on objects, not on programs (so the string you defined would not be part of it). But instance variables would be part of it.

There are various ways to do this. One revolves around the Serializable interface and ObjectOutputStream (which will give you a binary representation readable only by Java code), another one uses java.beans.XMLEncoder (which generates XML files).
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!