//Strcpy.java
class Strcpy
{
public static void main(String[] args)
{
String str="Hello, this is a book on java";
char arr[]=new char[20];
//copy from str into arr starting from 7th char to 20 char
str.getChars(7,21,arr,0);
System.out.println(arr);
}
}
class Strcpy
{
public static void main(String[] args)
{
String str="Hello, this is a book on java";
char arr[]=new char[20];
//copy from str into arr starting from 7th char to 20 char
str.getChars(7,21,arr,0);
System.out.println(arr);
}
}
No comments:
Post a Comment