q2-5からq2-8まで完了

This commit is contained in:
2026-09-11 14:37:22 +09:00
parent f74b2041e2
commit a6152d2a13
5 changed files with 15 additions and 11 deletions

View File

@@ -11,7 +11,7 @@ public class PTra01_09 {
// char cha;
// double doubl;
// Boolean bool;
byte byte1;
byte b;
short short1;
int int1;
long long1;
@@ -20,16 +20,16 @@ public class PTra01_09 {
char char1;
boolean boolean1;
// TODO 基本型8種類の変数を宣言します(変数名は自分できめてOKです)
byte1 = 100;
b = 100;
short1 = 30000;
int1 = 101;
long1 = 1011;
float1 = 10111;
double1 = 1012;
char1 = 10121;
long1 = 1011L;
float1 = 10111.0f;
double1 = 1012.00;
char1 ='a' ;
boolean1 = true;
// TODO 宣言した変数に、値を代入してください(代入する値はなんでもOKです)
System.out.println(byte1);
System.out.println(b);
System.out.println(short1);
System.out.println(int1);
System.out.println(long1);