Write Java declaration statement for the followings. i. Declare the

Berikut ini adalah pertanyaan dari Maxiley pada mata pelajaran TI untuk jenjang Sekolah Menengah Atas

Write Java declaration statement for the followings. i. Declare the appropriate type of data to store a variable named weight with a value of 52.5 kg. Declares the appropriate type of data to store characters of a book and name the variable as ch. Declare the appropriate type of data to store student results and name the variables as grade with a result.​

Jawaban dan Penjelasan

Berikut ini adalah pilihan jawaban terbaik dari pertanyaan diatas.

Jawaban:

i. To store a variable named "weight" with a value of 52.5 kg, you can declare it as follows: double weight = 52.5;

ii. To store characters of a book, you can declare a variable named "ch" with the appropriate type of data: char ch;

iii. To store student results, you can declare a variable named "grade" with the appropriate type of data: int grade;

Note: If the result is a decimal number, you can use double type instead of int.

Semoga dengan pertanyaan yang sudah terjawab oleh riskirachmad199 dapat membantu memudahkan mengerjakan soal, tugas dan PR sekolah kalian.

Apabila terdapat kesalahan dalam mengerjakan soal, silahkan koreksi jawaban dengan mengirimkan email ke yomemimo.com melalui halaman Contact

Last Update: Wed, 10 May 23