Ask Question
2 February, 04:39

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

+1
Answers (1)
  1. 2 February, 05:40
    0
    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.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “declare and initialise a variable called 'initial' that will hold the first letter of your name in java ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers