Wrapper Classes
Autoboxing & Unboxing

Wrapper Classes

Wrapper classes provides the mechanism to convert primitive into object and object into primitive.

There are two way to conversion.

  1. Autoboxing:- The automatic conversion of primitive into an object is known as autoboxing.
  2. Unboxing: - The forcely conversion of object into primitive is known as unboxing.

boolean - Boolean

char - Character

int - Integer

byte - Byte

short - Short

long - Long

float - Float

double - Double


要查看或添加评论,请登录

Nilu Kumari的更多文章

  • Data Structure #01

    Data Structure #01

    Given an integer array nums, return true if any value appears at least twice in the array, and return false if every…

  • Binary Tree:-

    Binary Tree:-

    Binary:- A binary tree is a recursive data structure where each node can have two children at most. A common type of…

  • Comparable & Comparator in Java

    Comparable & Comparator in Java

    Comparable & Comparator both are interfaces and can be used to sort collection elements. Comparable provides a single…

  • Queue Implementation Using LinkedList

    Queue Implementation Using LinkedList

    Queue:- A queue is defined as a linear data structure that is open at both ends and the operations are performed in…

  • Doubly Linked List

    Doubly Linked List

    Doubly Linked List:- A doubly linked list is a special type of linked list in which each node contains a pointer to the…

  • LinkedList Implementation In detail.

    LinkedList Implementation In detail.

    LinkedList--> LinkedList is a part of the Collection Framework present in java.util package.

  • Composition in Java

    Composition in Java

    Composition:-composition represents a stronger relationship where one class is composed of one or more other classes…

  • Aggregation in Java

    Aggregation in Java

    Association:- Association is to show the relationship between two or more class. It shows Has-a-relationship.

  • JDBC

    JDBC

    /* * JDBC: Java Database Connectivity * In real word we are seeing that some login page or register page * when a user…

  • Stack Implementation Using LinkedList

    Stack Implementation Using LinkedList

    public class Stack { static class Node{ int data; Node next; Node(int data){ this.data=data; this.

社区洞察

其他会员也浏览了