class Demo { public static void main(String[] args) { StringBuffer str = new StringBuffer("Technology"); System.out.println(str); String str1 = str.toString(); System.out.println(str1); // StringBuffer to String convertion // o/p - Technology // Technology } }