Studying
parent
bd414b3d51
commit
bb527bf234
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.mycompany.mavenproject1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class TypeCasting {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
double b = 5.3;
|
||||
int c = (int) b;
|
||||
double d = ((double) 1 / 2);
|
||||
|
||||
System.out.println(b);
|
||||
System.out.println(c);
|
||||
System.out.println(d);
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue