Wednesday, February 8, 2012

CSE412lab3


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cse412lab3;

/**
 *
 * @author LynAs
 */
public class CSE412lab3 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Integer num1=new Integer(20);
        String name1=new String("25");
        int x=50;
        System.out.println(num1.toString());
     
        int res=0;
       
        res = x+ Integer.parseInt(name1);
       
        System.out.println(res);
       
        System.out.println(num1.getClass());
       
       
        String name2=new String("Cse 412 Lab");
       
        System.out.println(name2.charAt(2));
        System.out.println(name2.compareTo("cse"));
        System.out.println(name2.concat(" is fun"));
        System.out.println(name2.contains("Cse"));
        System.out.println(name2.hashCode());
        System.out.println(name2.length());
        System.out.println(name2.toUpperCase());
       
        rice robj1=new rice();
        robj1.method1();
        robj1.eating();
       
    }
}

No comments:

Post a Comment