String Comparison in Java
public class StringTest {
public static void main(String[] args) {
String str="hello";
String str1="elephant";
System.out.println(str1.co…Read More
Enumeration in Java
public enum DayEnum {
SUNDAY,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY
}
public class DayEnumExample {
public static voi…Read More
String sorting in Java
public class StringSorting {
public static void main(String[] args) {
String[] str={"Zero","Hello","Hi","My","egg"};
for(int i=0;i<str…Read More
String Operations in Java
In this program the character x is moved to the last
public class MoveStringAtLast {
public static void main(String[] args) {
StringBuffer …Read More
StringBuffer in java
In this program the same characters are seperated by *
public class IDString {
public static void main(String[] args) {
StringBuffer str1=new S…Read More
0 comments:
Post a Comment