Professional Documents
Culture Documents
class stringToInteger{
Integer i =Integer.valueOf(str);
Output
Practical 15.3
import java.lang.*;
class intwrapper{
int a = Integer.parseInt("14");
int b = Integer.parseInt("16");
int c = a+b;
System.out.println("String:"+str);
if(op>0){
System.out.println("object1 is greater");
else if(op<0){
System.out.println("object2 is greater");
else{
Output
Addition of 14 and 16 is 30
String:30
Object 2 is greater