Program to demonstrates the - toCharArray( )

/* Program to demonstrates the - toCharArray( ) */

class toCharArrayDemo
{
    public static void main(String args[ ])
    {
        String s =" Java is Object Oriented Language";
        char ch[]= new char[s.length()];

        ch=s.toCharArray();
        System.out.println("All characters in a String object is converted to character Array..");
        System.out.println(ch);
    }
}

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|