Question: Suppose you have the following declarations in a program: String lastName = ' ' ; / / Variable that is initialized with an empty string.
Suppose you have the following declarations in a program:
String lastName ; Variable that is initialized with an empty string.
int age Variable that stores a person's age.
char firstInitial ; Variable that stores a person's first initial.
double gpa ; Variable that stores a person'sstudents GPA.
Which declaration is coded correctly?
Group of answer choices
String lastName ;
int age
char firstInitial ;
double gpa ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
