Write a Java program that declare 3 variables. The first variable is a string contains "This is my first program.". The
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write a Java program that declare 3 variables. The first variable is a string contains "This is my first program.". The
Statement. Output: This is my first program. The length of the string = 25 Does the string equal to "my first program."? false
Write a Java program that declare 3 variables. The first variable is a string contains "This is my first program.". The second variable is an integer stores the string length. The third variable is a boolean stores the result after checking if the string equals “my first program." or not. Print the result using Print