Question: Create a program called ` MySecondProgram . java ` . - ( 1 ) Define two String variables and provide any value that you want.

Create a program called `MySecondProgram.java`.
-(1) Define two String variables and provide any value that you want. Use Computer Science
-(2) Define two numbers (one of them must be a decimal number). Use 4,2.5
-(3) Define a variable called third that will hold the third character from the first String defined in (1).
What will be the data type of this variable?
-(4) Define a variable called sum that will store the addition of the two numbers that you defined in (2).
-(5) Define a variable called second that will contain the value of second String from (1). The content of the second character must be in uppercase.
-(6) Define a String variable called password that will be composed of the following characters:
a: the first character from the second String
b: the second character from the second String
c: the first number
d: the last character from the first String
e: the second number
f: a special character of your preference
The resulting password can be demonstrated by printing the variable password using the println() function.

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!