Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

wrapper classes in java

Wrapper classes: classes that are dedicated to primitives        
Byte, Short, Integer, Long, Float, Double, Character, Boolean
presented in "java.lang" package
AutoBoxing: converting primitive values to wrapper class
		int a = 100;
		Integer b = a  // auto boxing
Unboxing: converting wrapper class value to primitives
		Integer a = 100;
		int b = a;  // unboxing
	int a = 100;
	double b = a;    // none
Comment

Java Wrapper Classes

Integer number = new Integer(77);//int
Integer number2 = new Integer("77");//String
Float number3 = new Float(77.0);//double argument
Float number4 = new Float(77.0f);//float argument
Float number5 = new Float("77.0f");//String
Character c1 = new Character('S');//Only char constructor
Character c2 = new Character(1234);//COMPILER ERROR
Boolean b = new Boolean(true);//value stored - true
Comment

wrapper classs

<!-- Bootstrap 4.5 css -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">

<div class="container my-4 w-50">

    <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
        <!-- Diapositivas -->
        <div class="carousel-inner">
            <div class="carousel-item active">
                <div class="card bg-dark text-white m-width-100">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="card-body">
                                <h5 class="card-title">Card title 1</h5>
                                <p class="card-text">Lorem ipsum dolor sit amet.</p>
                                <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <img src="https://i.stack.imgur.com/yyE56.png" alt="..." width="100%">
                        </div>
                    </div>
                </div>
            </div>
            <div class="carousel-item">
                <div class="card bg-dark text-white m-width-100">
                    <div class="row g-0">
                        <div class="col-md-6">
                            <div class="card-body">
                                <h5 class="card-title">Card title 2</h5>
                                <p class="card-text">Lorem ipsum dolor sit amet.</p>
                                <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <img src="https://i.stack.imgur.com/yyE56.png" alt="..." width="100%">
                        </div>
                    </div>
                </div>
            </div>
            <div class="carousel-item">
                <div class="card bg-dark text-white m-width-100">
                    <div class="row g-0">
                        <div class="col-md-6">
                            <div class="card-body">
                                <h5 class="card-title">Card title 3</h5>
                                <p class="card-text">Lorem ipsum dolor sit amet.</p>
                                <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <img src="https://i.stack.imgur.com/yyE56.png" alt="..." width="100%">
                        </div>
                    </div>
                    </div>
            </div>
        </div>
        <!-- Controles -->
        <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    </div>

</div><!--//container-->

<!-- jQuery full con ajax -->
<script src="https://code.jquery.com/jquery-3.5.1.js" integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" crossorigin="anonymous"></script>

<!-- Bootstrap 4.5 js -->
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script>
 Ejecutar
Comment

PREVIOUS NEXT
Code Example
Java :: sharedpreferences 
Java :: java math random 
Java :: java load jar at runtime 
Java :: arrondi java 
Java :: intersection of two arrays java 
Java :: print statement in java, simplest java program, Hello World in Java 
Java :: processing pi 
Java :: Java if...else Statement 
Java :: qr code spring boot 
Java :: run java file 
Java :: java int 0/0 
Java :: generate objects with for loop java 
Java :: java complex numbers 
Java :: what does setFocusable do in java 
Java :: maths trivia in java 
Java :: int conversion to float 
Java :: java how to create subclass 
Java :: set up a tree in java 
Java :: can abstract class have non abstract methods in java 
Java :: java append to array 
Java :: using super in java 
Java :: add items to linked list java 
Java :: java spring mvc 
Java :: keycloak spring boot application.properties 
Java :: java to python 
Java :: why the fuck java suck 
Java :: repeat a string in java 
Java :: instance block in java 
Java :: Creategoogle maps marker with custom image/bitmap 
Java :: split email on dot java 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =