The Artima Developer Community
Sponsored Link

Java Buzz Forum
Byte Wrapper Class

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
instanceof java

Posts: 576
Nickname: instanceof
Registered: Jan, 2015

instanceof java is a java related one.
Byte Wrapper Class Posted: Jun 17, 2015 10:43 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by instanceof java.
Original Post: Byte Wrapper Class
Feed Title: Instance Of Java
Feed URL: http://feeds.feedburner.com/blogspot/TXghwE
Feed Description: Instance of Java. A place where you can learn java in simple way each and every topic covered with many points and sample programs.
Latest Java Buzz Posts
Latest Java Buzz Posts by instanceof java
Latest Posts From Instance Of Java

Advertisement
Byte Wrapper class Programs:
The java.lang.Byte class is used to primitive type byte in the form of object.

public final class Byte
extends Number implements Comparable<Byte>

Byte Class Constructors:
Byte(byte value)
Byte(String s)

Byte Class Methods:

public byte byteValue() returns the value of this Byte as a byte.

Program:

package com.instanceofjava;

import java.lang.*;

public class ByteClass {

   public static void main(String[] args) {
      Byte a;
      a = new Byte("100");
      byte t;
      t = a.byteValue();
      String s= "byte value of Byte object " + a + " is " + t;
      System.out.println( s);
   }
}

Output:
byte value of Byte object 100 is 100



Read: Byte Wrapper Class

Topic: Java Agents Previous Topic   Next Topic Topic: Batch Deployment in AWS Elastic Beanstalk

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use