JavaTweets

Blog on Java Programming and Interview Questions

Object Cloning



  • Cloning of object in Java - Shallow Copy and Deep Copy
  • Deep cloning using serialization in Java
  • Shallow cloning vs Deep cloning in java
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Home
Subscribe to: Comments (Atom)

Total Pageviews

Blog Archive

  • ▼  2012 (254)
    • ▼  August (44)
      • When should I use an interface instead of an abstr...
      • Compare two StringBuffer objects in Java
      • New Java 7 Features: Using String in the Switch St...
      • Comparing String with StringBuilder in Java
      • Comparing String with StringBuffer in Java
      • Difference between == , equals and equalsIgnoreCase
      • Java String to byte Array Example
      • Java Substring Example
      • Java String to Upper Case example
      • Java String to Lower Case example
      • Java String isEmpty Example
      • Java String Reverse Example
      • Java String Trim Example
      • Java String Split Example
      • Java String Replace Example
      • Java String Length Example
      • Determining If a String Contains a Substring in Java
      • Java String Concatenation and Performance
      • Java String Compare using compareTo and compareToI...
      • Java String methods - indexOf() and lastIndexOf()
      • Searching a String for a Character or a Substring ...
      • Java Char Array To String Example
      • Convert String to Character Array Example
      • Copy all the key-value pairs from one Map into ano...
      • Get Tail Map from Java TreeMap example
      • Get Head Map from Java TreeMap example
      • Get Sub Map from Java TreeMap example
      • Get lowest and highest key stored in Java TreeMap ...
      • Get Synchronized Map from Java TreeMap example
      • Remove value from Java TreeMap example
      • Remove all values from Java TreeMap example
      • Get Size of Java TreeMap Example
      • Check if a particular value exists in Java TreeMap...
      • Check if a particular key exists in Java TreeMap e...
      • How to get all keys in Java TreeMap?
      • Get Set view of Keys from Java TreeMap example
      • Iterate through the values of Java TreeMap example
      • Simple Java TreeMap example
      • Checked vs Unchecked Exceptions in Java
      • Creating user defined exceptions in Java
      • Exception Handling : Throws clause in Java
      • Difference between throw and throws in Java?
      • How to Throw Exceptions in Java
      • What is finally block in java?
    • ►  July (134)
    • ►  June (13)
    • ►  May (2)
    • ►  April (10)
    • ►  March (14)
    • ►  February (18)
    • ►  January (19)
  • ►  2011 (3)
    • ►  December (3)

Categories

  • Home
  • SCJP Objective Questions
  • ArrayList Examples
  • Date & Calendar Examples
  • Files and I/O
  • java.util.zip
  • LinkedList Examples
  • Object Cloning
  • Serialization
  • Wrapper classes
  • Collections Framework
  • Multithreading
  • HashSet Examples
  • TreeSet Examples
  • Utility class - Collections
  • HashMap Examples
  • String Examples
  • TreeMap Examples
  • Exception Handling

Search This Blog

Followers

blog status

Popular Posts

  • Iterate through elements of Java TreeSet example
    This Java Example shows how to iterate through elements of Java TreeSet object. import java.util.Iterator; import java.util.TreeSet; pub...
  • Copying and Cloning Sets: public Object clone()
    Calling the clone() method of a HashSet creates a shallow copy of that HashSet.(the elements of the set aren't duplicated. Both sets wi...
  • Operators and Assignments - Objective Questions - Part 1
    1) What will be the output of the program? class Test {     static int s;     public static void main(String [] args)     {      ...
  • Shallow cloning vs Deep cloning in java
    Cloning Cloning means creating a copy of the object( not just the object reference copying as mentioned above). Cloning creates and...
  • How To Compare two java.util.Date objects using Date.CompareTo() method
    We can use Date.compareTo() method to compare two java.util.Date objects for ordering. public int compareTo(Date anotherDate) where...
  • Java String isEmpty Example
    This Java String isEmpty example shows how to check whether the given string is empty or not using isEmpty method of Java String class. ...
  • Serializing an object which has a non-serializable parent class
    An object is serializable (itself implements the Serializable interface) even if its superclass is not.When you serialize an object, the se...
  • Difference Between volatile and synchronized in Java
    Before discussing the difference between volatile and synchronized we have to know a little about java memory model,if one instance or sta...
  • Convert Array to TreeSet in Java
    This Java Example shows how to convert an array to Java TreeSet object using Arrays.asList method. import java.util.Arrays; import java.u...
  • Read and Write Unicode File in Java
    We can use java.io.InputStreamReader class to read a file in a user-specified decoding and  java.io.OutputStreamWriter class to write a fi...
Powered by Blogger.