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
Elodia [21]
3 years ago
11

Create a conditional expression that evaluates to string "negative" if userVal is less than 0, and "non-negative" otherwise. Ex:

If userVal is -9, out
Computers and Technology
1 answer:
ArbitrLikvidat [17]3 years ago
8 0

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 

 System.out.print("Enter a number: ");

 int userVal = input.nextInt();

 

 String aString;

 if(userVal < 0)

     aString = "negative";

 else

     aString = "non-negative";

     

 System.out.println(aString);

}

}

Explanation:

Ask the user to enter a number and set it to userVal

Check the value of userVal. If it is smaller than 0, set the string as "negative". If it is not, set it as "non-negative"

Print the string

You might be interested in
True or False. A compact disc (CD) stores music in a coded pattern of tiny pits 10−7m deep. The pits are arranged in a track tha
vovikov84 [41]

Answer:

True.

Explanation:

Yes it is true. A CD works on exactly the same pattern defined above.

3 0
3 years ago
What kind of a bug is 404 page not found
Allisa [31]

Answer:A 404 error is often returned when pages have been moved or deleted. ... 404 errors should not be confused with DNS errors, which appear when the given URL refers to a server name that does not exist. A 404 error indicates that the server itself was found, but that the server was not able to retrieve the requested page.

Explanation: Hope this helps

7 0
3 years ago
Read 2 more answers
"what should you do if the system continually reboots and you can't read the error message produced on a blue screen
mr_godi [17]
I am fairly sure the command for boot options is F11, and if not, then power down the system manually and turn it back on
4 0
3 years ago
Read 2 more answers
What is NOT an issue associated with tag management systems? There is no automation available for tag management systems. Managi
SSSSS [86.1K]

Answer:

Managing tags means experience with the programming language to utilize them.

Explanation:

In different markets, tags are used to assigned prices and values to different products. To make these tags "tag management systems" are deployed to manage and create these tags.

Tag management system is software, that is used to create the tags with ease. There is no need of coding or programming while creating tags.

<em>So we can say that, There is no issue of Managing tags means experience with the programming language to utilize them.</em>

5 0
4 years ago
Immigrants are allowed to enter the country to work when they have a(n)
Roman55 [17]

Answer:

D. a Visa

Explanation:

4 0
3 years ago
Other questions:
  • Which of the following characteristics relates to authentication header (AH)? It is a document that defines or describes compute
    11·1 answer
  • What is a bug?
    11·2 answers
  • What is an effective way to display calculations in a Word document
    7·2 answers
  • An installed theme can be applied by clicking on a theme in the themes group on the ____ tab.
    7·2 answers
  • 6. A distribution consists of three components with frequencies 200, 250 and 300 having means
    14·1 answer
  • Josephine is in the process of creating ads within her Standard Display campaign. She finds that there are two main ad formats t
    5·1 answer
  • Savings accounts usually offer _________ interest rates than checking accounts. It is _________ to access your money in a saving
    10·2 answers
  • For each of the threats and vulnerabilities from the Identifying Threats and Vulnerabilities in an IT Infrastructure lab in this
    10·1 answer
  • The _____ method randomly rearranges the items in the list provided in the parentheses.
    5·2 answers
  • If a work is in the public domain… Group of answer choices its copyright has expired. it may not be used for commercial purposes
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!