import java.util.Scanner;
public class Program_4 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str = scan.next();
System.out.println("Lenght of String : "+str.length());
System.out.println("Print second half : "+str.substring(str.length()/2));
}
}
Find all the practical at one place of Gujarat Technological University(GTU) With Solutions.
Tuesday, September 18, 2018
Write a program to find length of string and print second half of the string.
Subscribe to:
Post Comments (Atom)
-
A country has a capital city A dining philosopher uses a fork A file is an ordinary file or a directory file Files cont...
-
import java.io.*; public class Dataio { public static void main(String args[]) throws IOException { DataInputStr...
No comments:
Post a Comment