1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
madreJ [45]
3 years ago
15

Select the invalid declaration from the lines of Java code below

Computers and Technology
1 answer:
yarga [219]3 years ago
8 0

Answer:

float avg = 23.5;

Explanation:

Given

The declarative statements

Required

Determine which of them is invalid

<em>Analyzing them one after the other;</em>

int zebraCnt = 40000;

This statement is valid as zebraCnt is correctly declared as type integer

<em></em>

long birdCnt = 222_222_222_222_222L;

This statement is valid as birdCnt is correctly declared as type long

float avg = 23.5;

This statement is invalid as avg is incorrectly declared as type float.

<em>To correctly declare avg, you either change the datatype to double: as follows;</em>

double avg = 23.5;

or <em>append f to the declaration; as follows</em>

float avg = 23.5f;

double avg = 98.32121;

This statement is valid as avg is correctly declared as type double

Hence, the incorrect declarative statement is float avg = 23.5;

You might be interested in
What are the differences between a trap (aka software interrupt) and an interrupt (hardware interrupt)? What is the use of each
Marta_Voda [28]

Answer:

Trap is a software interrupt that occurs when there is a system call, while hardware interrupt occurs when a hardware component needs urgent attention.

Explanation:

Interrupt is an input signal that disrupt the activities of a computer system, giving immediate attention to a hardware or software request.

In trap interrupt, the system activities are stop for a routine kernel mode operation, since it has a higher priority than the user mode. At the end of the interrupt, it switches control to the user mode.

The hardware interrupt is a signal from hardware devices like the input/output devices, storage and even peripheral devices that draws an immediate attention of the processor, stopping and saving other activities and executing the event with an interrupt handler.

6 0
4 years ago
How all wheel drive works
faltersainse [42]
Yani cnm bu senin kararin istegidiin gibi davran Basarilar
8 0
4 years ago
Which of these can a worksheet within a spreadsheet contain?
Lisa [10]
<span>d) all of these is your correct answer</span>
3 0
4 years ago
Read 2 more answers
how do you define technological world is a easier way for this low iq girl to understand its for my essay pls help me im about t
Gelneren [198K]
A world that uses technology.
5 0
3 years ago
Fiona is creating a presentation with PowerPoint Online about how pencils are made. She would like to type an explanation about
777dan777 [17]

Answer:THE ANSWER IS A.

Explanation:I DID IT AND I GOT 100

6 0
3 years ago
Other questions:
  • What is an example of constructive criticism for an employee who is shy during meetings?
    15·2 answers
  • If you want to store the information that a user types in response to the input() function, what do you need to do? (select the
    11·1 answer
  • Help!!!!!!!!!!!!!!!!!
    11·1 answer
  • With Voice over Internet Protocol (VoIP), _____. a. voicemails cannot be received on the computer b. call quality is significant
    6·1 answer
  • What is the definition of posture<br>​
    7·1 answer
  • (This is for photography segment exam btw)
    11·2 answers
  • How is a UDP socket fully identified? What about a TCP socket? What is the difference between the full identification of both so
    9·1 answer
  • HELP ASAP Encoding a video format and then decoding it during playback is one of the functions of MPEG-4 and H.264 file players.
    10·2 answers
  • Group of programs are software ​
    6·2 answers
  • Which of the following is an example of group dynamics?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!