Question: Questions 1 . Variable Declaration: Write a Java program that declares an integer variable age and assigns it the value 2 0 . Print the

Questions
1. Variable Declaration:
Write a Java program that declares an integer variable age and assigns it the value 20. Print the value of age.
2. Data Types:
Create a Java program that declares a float variable temperature and assigns it the value 36.6. Print the value of temperature.
3. String Manipulation:
Write a Java program that declares a string variable name and assigns it your name. Print a greeting message like "Hello, [name]!".
4. If-Else Statement:
Write a program that declares an integer variable score and assigns it a value of 75. Use an if-else statement to check if the score is greater than or equal to 60. If it is, print "Pass", otherwise print "Fail".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!