Java Tutorial with Java Code Examples

Java Basics | String | Date | Collection | Java Map | Java Util | File I/O | XML | Threading | Network | i18n | Misc
Java Swing | JDBC | Servlet | JSP | JSTL | JMS | EJB | JPA | JSF | Struts | Spring | Hibernate
Web Services | Java PDF | JUnit | Ant | HTML | JavaScript | Apache | Tomcat | SQL | T-SQL | PL/SQL | MySQL

Java Basics

Introduction

Data Types and Arrays

Get User Input

Data Type Conversions

Control Flow

Handling Exception

 

  Java Basics » Data Types and Arrays » byte and Byte

  Java Code Example:  ByteExample.java  Download Sample Source Code

/*
 * Copyright © 2008 - 2009 it.ibluespace.com. All rights reserved.
 */
public class ByteExample { public static void main(String args[]) { byte minValue = Byte.MIN_VALUE; byte maxValue = Byte.MAX_VALUE; System.out.println("The minimum value of a byte is: " + minValue); System.out.println("The maximum value of a byte is: " + maxValue); } }
 Download Source Code: ByteExample.java

The command executed and output produced:


E:\JavaEECoding\>java ByteExample
The minimum value of a byte is: -128
The maximum value of a byte is: 127

Search for Java code examples on this site

 
 

Resources

Java Tutorial

Java World

Java SE 6 API Doc


Terms of Use  |  License  Copyright 2008-2009 it.ibluespace.com. All rights reserved.  | 
All other trademarks are the property of their respective owners.