francescahili francescahili
  • 19-06-2020
  • Computers and Technology
contestada

declare and initialise a variable called 'initial' that will hold the first letter of your name in java

Respuesta :

rainestormee
rainestormee rainestormee
  • 19-06-2020

Answer:

Character initial = 'R';

Explanation:

For defining a variable, first you must identify the type of the variable, in this case it is a Character as we are only holding a single character.

The next step in defining a variable is the identifier, which is the name of the variable, in this case "initial".

Now we need to assign the needed character, in this case 'R' (for my first name), you use a single '=' to assign a variables, and finally you close the line with a semi-colon, as is standard in Java.

Answer Link

Otras preguntas

Find function value f (6) if f (x) = 4x
how do you show work for 3x-11=22
55% of 140 percent of a number
what are 3 reasons scientist found Rutherford's nuclear atomic model to be fundamentally incomplete
How many calendar days pass between the new moon and full moon?
Many Egyptians loved perfume, and Egypt imported some of the finest perfumes. A. Yes B. No
I have a poem to do on Emancipation I don't know how to start. HELPPPP.
Complete this superstition: If you hear someone's footsteps following you on Halloween night, you shouldn't turn around or else, what? You will get an egg in y
what is the decimal conversion of 8 39/40 and does the decimal repeat or terminate
Elections In a mayoral election, the number of votes for the incumbent was 25% more than the number for the opponent. Altogether, the two candidates received 5