101 Study Guide - Final Guide: Java Package, Source Code, Test Case

24 views23 pages

Document Summary

To write a java program to demonstrate the use of different data types in java. Source code: - import java. io. public class data public static void main (string[] args) byte b=100; short s=123; int v=1234532; int calc=9876543; long amountval=1234567891; float rate=12. 25f; double val=12345. 234d; boolean flag=true boolean bval=false char ch=88; char ch2="a"; Short value123 int value =1234543 int calc = 9876543 long amountval =1234567891 float interest rate =12. 25 double value = 12345. 234 boolean flag value =true boolean vale =false char a value =88 char b value =65. Thus the above program to demonstrate different types of data types in java is executed. Aim: -to write java program to demonstrate different types of operators in java. Algorithm: : start, import java package, declare and define the class name operators, declare variables needed as x, a, b, c, using print statements perform. 5. 1) all increments and decrement operators to x variables.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents

Related Questions