Class 10 ICSE - Java

Class 10th Java aims to empower students by enabling them to build their own applications introducing some effective tools to enable them to enhance their knowledge, broaden horizons, foster creativity, improve the quality of work and increase efficiency.
It also develops logical and analytical thinking so that they can easily solve interactive programs. Students learn fundamental concepts of computing using object oriented approach in one computer language with a clear idea of ethical issues involved in the field of computing
Class 10th java topics includes revision of class 9th, constructors, user-defined methods, objects and classes, library classes , etc.

Autoboxing & Auto-unboxing

Autoboxing




Auto boxing is the automatic conversion of the primitive types in to their corresponding wrapper classes. For example automatic conversion from an int to an Integer and from a double to a Double.

Consider the following statement :

Integer myInt = 20

It is a simple example where the int value 20 is autoboxed into wrapper class Integer.



Output :

Auto-unboxing




Auto-unboxing is the reverse process of Autoboxing. That means the automatic conversion of the wrapper classes object into their corresponding primitive type. For example automatic conversion from an Integer to an int and from a Double to a double .

Consider the following statement :

Integer myInteger = 20;

int myInt = myInteger;

It is a simple example where the object myInteger automatically unboxed into primitive type int. When the assignment

⇛ MyInt = myInteger takes place.



Output :

Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com