Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

int to byte

int i = 234;
byte b = (byte) i;
System.out.println(b); // -22
int i2 = b & 0xFF;
System.out.println(i2); // 234
Comment

int to byte


int i = 234;
byte b = (byte) i;
System.out.println(b); // -22
int i2 = b & 0xFF;
System.out.println(i2); // 234

Comment

Convert int to byte java

Integer.valueOf(5).byteValue();
Comment

PREVIOUS NEXT
Code Example
Java :: java random number between 2 values inclusive 
Java :: java get year month day hour minute second 
Java :: simple login password and username java 
Java :: changer version java terminal 
Java :: array contains java 
Java :: java scanner string to int 
Java :: is upper in java 
Java :: java mp3 player 
Java :: java % 
Java :: frequency of each element from list in java 
Java :: java quotes in string 
Java :: can strings be used in a 2 dimensional array in java 
Java :: java exception message 
Java :: filtering out unique values from a list in java 
Java :: java add to map 
Java :: java date format with timezone 
Java :: graph contains a cycle 
Java :: get the image from camera click in android 
Java :: java break multiple loops 
Java :: java loop through list 
Java :: java quick sort 
Java :: random boolean java 
Java :: export java_home linux 
Java :: remove duplicates from sorted array 
Java :: javac clear 
Java :: how to find max in min in an array 
Java :: change color of drawable android studio 
Java :: bean factory vs application context 
Java :: java dimension 
Java :: list to map of list java 8 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =