Question

Write a program in JAVA that prints the bounds ( maximum and minimum values) for all...

Write a program in JAVA that prints the bounds ( maximum and minimum values) for all integer data types in Java.

Homework Answers

Answer #1
public class Ranges {

    public static void main(String[] args) {
        System.out.println("Range of byte: " + Byte.MIN_VALUE + " to " + Byte.MAX_VALUE);
        System.out.println("Range of short: " + Short.MIN_VALUE + " to " + Short.MAX_VALUE);
        System.out.println("Range of int: " + Integer.MIN_VALUE + " to " + Integer.MAX_VALUE);
        System.out.println("Range of long: " + Long.MIN_VALUE + " to " + Long.MAX_VALUE);
    }
}

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
iNTRODUCTION TO JAVA PROGRAMING Write a program that prints a triangle using star (*) maximum star...
iNTRODUCTION TO JAVA PROGRAMING Write a program that prints a triangle using star (*) maximum star (10) Program output ********** ********* ******** ******* ****** ***** **** *** ** *
Write a program that takes a positive integer argument N, and prints out the average, minimum,...
Write a program that takes a positive integer argument N, and prints out the average, minimum, and maximum (in that order) of N uniform random numbers that it generates. Note that all three statistics should be over the same sequence of N random numbers.
In java : Write a program that will provide important statistics for the grades in a...
In java : Write a program that will provide important statistics for the grades in a class. The program will utilize a for-loop to read ten floating-point grades from user input. Include code to prevent an endless loop. Ask the user to enter the values, then print the following data: Average Maximum Minimum
JAVA CODE Write a program which has a 3D array and prints the integers from the...
JAVA CODE Write a program which has a 3D array and prints the integers from the array. Then then convert the output into a file using filewriter
Write a Java program that calculates and prints the monthly pay for an employee. The net...
Write a Java program that calculates and prints the monthly pay for an employee. The net pay is calculated after taking the following deductions: Withholding Tax 10% SSS Contribution 2.50% Medicare 1.30% PensionPlan PHP 200.00
write a program that prints all palindromic numbers between 0-9999 into the screen. Note :The code...
write a program that prints all palindromic numbers between 0-9999 into the screen. Note :The code should be written in java language.
Write a Java program to randomly create an array of 50 double values. Prompt the user...
Write a Java program to randomly create an array of 50 double values. Prompt the user to enter an index and prints the corresponding array value. Include exception handling that prevents the program from terminating if an out of range index is entered by the user. (HINT: The exception thrown will be ArrayIndexOutOfBounds)
Using for loops: - write a Java program that adds numbers between 1 to 100 and...
Using for loops: - write a Java program that adds numbers between 1 to 100 and prints the result. - write a Java program that adds odd numbers between 1 to 100 and prints the result - write a Java program that averages even numbers between 5 to 30 and prints the result
Write a program that uses an array of integers initialized to whatever values you wish. Write...
Write a program that uses an array of integers initialized to whatever values you wish. Write a methods to calculate and return the minimum and a method to calculate and return the maximum value in the array. Write an additional method that accepts the array as a parameter and then creates and returns a new array with all the same values as the original plus 10. (num +=10) In Java
Java Program: You will be inserting values into a generic tree, then printing the values inorder,...
Java Program: You will be inserting values into a generic tree, then printing the values inorder, as well as printing the minimum and maximum values in the tree. Given main(), write the methods in the 'BSTree' class specified by the // TODO: sections. There are 5 TODOs in all to complete. Ex: If the input is like ferment bought tasty can making apples super improving juice wine -1 the output should be: Enter the words on separate lines to insert...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT