programme:- to take name from input and convert in into small letters and count the no. of character.
public class string
{
public static void main(String args[])
{
String s1;
s1= new String(args[0]);
System.out.println(s1.toLowerCase());
System.out.println(s1.length());
}
}
how to use it:
go to cmd
1) javac string.java
2) java string SHIP
public class string
{
public static void main(String args[])
{
String s1;
s1= new String(args[0]);
System.out.println(s1.toLowerCase());
System.out.println(s1.length());
}
}
how to use it:
go to cmd
1) javac string.java
2) java string SHIP
No comments:
Post a Comment