repl.it
@ABHISHEKAREER/

TYPE CONVERSION IN JAVA

Java

INT TO BYTE

fork
loading
Files
  • Main.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Main {
  public static void main(String[] args) {
    byte bb;
    int i=230;
    double dd=323.175;
    System.out.println("\n conversion of int to byte");
    bb=(byte) i;
    System.out.println(bb);
    System.out.println("conversion of double to int");
    i=(int ) dd;
    System.out.println(i);
    
  }
}
Fetching token
?