Home
Tutorials
Core Java
Introduction To Java
Java Evolution
Overview of Java
Constants, Variables and Data Types
Java Operators
Branching Statements
Looping Statements
Classes, Objects and Methods
Inheritance
Array, String and Vectors
Java Interfaces
Java Packages
Applet Programming
Graphics Programming
Advanced Java
Java AWT
Java Event Handling
Java File Handling
Java MultiThreading
Java Swing-I
Java Swing-II
Exception Handling
Socket Programming
Java Database
Java RMI
Java Servlets
Java Beans
Programms
Projects
Downloads
Contact
Java Programming
!doctype>
Wrapper Classes in Java
public class WrapperExample { public static void main(String args[]) { int a=20; Integer i=Integer.valueOf(a);//converting int into Integer explicitly Integer j=a;//autoboxing, now compiler will write Integer.valueOf(a) internally System.out.println(a+" "+i+" "+j); } }
Output
No comments:
Post a Comment
No comments:
Post a Comment