Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Converting data in java

// Java Program to Illustrate Conversion of
// Integer and Double to Byte
 
// Main class
class GFG {
 
    // Main driver method
    public static void main(String args[])
    {
        // Declaring byte variable
        byte b;
 
        // Declaring and initializing integer and double
        int i = 257;
        double d = 323.142;
 
        // Display message
        System.out.println("Conversion of int to byte.");
 
        // i % 256
        b = (byte)i;
 
        // Print commands
        System.out.println("i = " + i + " b = " + b);
        System.out.println(
            "
Conversion of double to byte.");
 
        // d % 256
        b = (byte)d;
 
        // Print commands
        System.out.println("d = " + d + " b= " + b);
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: OkHttp3 Never Timeout on slow internet 
Java :: java static inner class 
Java :: Java socket connect to gmail 
Java :: show all debug points intellij 
Java :: google pass api integration in java 
Java :: hint property of plain text in android studio 
Java :: MojoExecutionException when generate sources cxf-xjc-plugin:3.3.0 java11 
Java :: how to add a command to a button 
Java :: find minimum of array java 
Java :: javax.annotation.PreDestroy cannot be found by org.eclipse.e4. 
Java :: Java how to handle HTTP GET request after establishing TCP connection 
Java :: does not have a NavController set on 21312310 kotlin 
Java :: android java onUpgrade() 
Java :: java schleife abbrechen 
Java :: convertir un float en int en java 
Java :: android volley benefits 
Java :: call to jdbc template each class not by super 
Java :: Java the implements this function will return a copy of the original String that has all characters replaced with plus signs ("+"), with the exception of word string appearances, which are left alone. 
Java :: springboot body 
Java :: java get first node in a list 
Java :: java program for wind-chill temperature 
Java :: what does % do in java 
Java :: java parse date with optional timezone 
Java :: at org.apache.spark.sql.errors.QueryCompilationErrors$.failedToFindKafkaDataSourceError(QueryCompilationErrors.scala:1037) 
Java :: okhttp Sending and Receiving Network Requests 3 21 
Java :: what is serialization and deserialization in rest assured 
Java :: capitalize in controlP5 
Java :: square operator java 
Java :: android java sqlite alter table 
Java :: kubernetes java client create namespace 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =