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
After reading through the code, what will happen when you click run?​
AnnyKZ [126]

Answer:

B.) Laurel will try to collect treasure when there is not any and it causes an error

Explanation:

Laurel is at the top right corner of the map. When you click run, laurel moves 1 step ahead. This spot is right above the coordinate of the very first diamond. There is no treasure at this spot.

Therefore, when the next command calls for collecting, there will be an error, as there is no treasure at the spot right above the first diamond.

4 0
3 years ago
Realiza un algoritmo que calcule la edad de una persona y si es mayor = a 18 que imprima mayor de edad de lo contrario que impri
WINSTONCH [101]

Answer:

Explanation:

El siguiente codigo esta escrito en Java. Le pide al usario que marque la edad. Despues el programa analiza la edad y imprime a la pantalla si el usario es mayor de edad o menor de edad. El programa fue probado y el output se puede ver en la imagen abajo.

import java.util.Scanner;

class Brainly

{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Cual es tu edad?");

       int age = in.nextInt();

       if (age > 18) {

           System.out.println("Mayor de Edad");

       } else {

           System.out.println("Menor de Edad");

       }

   }

}

7 0
3 years ago
TP is commonly used to __________ and __________ files to a server.
Goshia [24]

Answer:

upload; download

Explanation:

This question is not complete: is not TP

Is FTP is an Internet protocol commonly used to upload and download files to a server, For example:

There are image banks where you can sell or share files like videos, music, and photographs, in this kind of website, you can transfer files for FTP, in FTP we must type a user name and password to send the files.

8 0
3 years ago
What most distinguishes projects with a strong need for computer animation from projects without such a strong need?
dsp73
<span> Computer animation is the process used for generating animated images with computers. </span>It is also referred to as CGI (Computer-generated imagery or computer-generated imaging).
If you understand the basic film processes (editing, sound, continuity) you could make an animated film either by making one drawing after another, moving an object frame by frame in front of the camera, or using some animation software. However, when it comes to big project what most 
<span>distinguishes projects with a strong need for computer animation from projects without such a strong need is the size of the budget, because people that know the animation industry and work well should be additional included in the project and paid.</span>
8 0
4 years ago
An example of an unaltered material used to create objects is
ehidna [41]
<span>At mine site of Rijckholt in the Neatherlands, archaeologists ...

</span>
3 0
3 years ago
Other questions:
  • ____ refers to the ability of one computing device (a desktop computer, portable computer, or smartphone, for example) on a netw
    12·1 answer
  • Angela's ready to get started with her first Smart Display campaign, but her account isn't yet eligible due to not having enough
    11·1 answer
  • Which of the following parameters should match in order for a pair of routers to form an adjacency when running OSPFv2? (Points
    9·1 answer
  • Keion works as a freelancer creating websites and designing logos for clients. He recently had a hard drive failure and lost wor
    12·1 answer
  • What do you call when a hacker users multiple guest computers to crack a password?
    11·1 answer
  • What is cutting-edge technology
    6·1 answer
  • How to get the home button on your screen?
    13·1 answer
  • Display the total number of parking tickets.
    5·1 answer
  • Need answer ASAP!!!!
    7·1 answer
  • HELP NEEDED PLEASE HELP!!! ​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!