(a) Rewrite the following using if else statement:
int x;
String s=(x%3=0)? “Divisible by 3" : "Not divisible by 3";
System.out.println(s);​

Answers

Answer 1

Answer:

int x;

String s;

if ((x%3) == 0) {

   s = "Divisible by 3";

} else {

  s = "Not divisible by 3";

}

System.out.println(s);​

Explanation:

A : B ? C generally translates to if (A) { B } else { C }.

Note the == to compare to 0. The single = in the original expression is a mistake.


Related Questions

which computer belongs to the first generation?​

Answers

ENIAC (Electronic Numerical Integrator and Calculator .)

When I’m design view, Henrietta deleted a previous criterion, added a new column, and filtered patients’ age. Which best describes what Henrietta did?

Answers

Answer:

Explanation:

b

A logistics company's vulnerability scan identifies the following vulnerabilities on Internet-facing devices in
the DMZ: SQL injection on an infrequently used web server that provides files to vendors SSL/TLS not used for a website that contains promotional information
The scan also shows the following vulnerabilities on internal resources: Microsoft Office Remote Code Execution on test server for a human resources system
TLS downgrade vulnerability on a server in a development network In order of risk, which of the following should be patched FIRST?
A. Microsoft Office Remote Code Execution
B. SQL injection
C. SSL/TLS not used
D. TLS downgrade

Answers

Answer:

A. Microsoft Office Remote Code Execution

Explanation:

From the given options, we have;

The web server having a SQL injection is infrequently use

The information on the website having SSL/TLS not used is promotional

The location of the server having  a TLS downgrade is on a development network

The location of the Microsoft Office Remote Code Execution is on a human resource system test server

Therefore, given that the test server, is the deployment source of the main server, and that with a Remote Code Execution, RCE,  cyber attack, the attacker is able to make commands work on other computers, the RCE attack on the test server is a potential access of an attack on the main servers, and should be patched first.

Design a sequential circuit with two flip-flops A and B and one input X. When X = 0, the state of the circuit remains the same. When X = 1, the circuit goes through the state transitions from 00 to 10 to 01 to 11, back to 00, and then repeats. Show the state transition by 7-segment display decoder using a. D-Flip Flop-Section B b. T-Flip Flop-Section A c. JK-Flip Flop-Section B d. RS-Flip Flop-Section A

Answers

Answer:

see your answer in picture with detail

please mark me brainlist

Explanation:

You want to add a new Product and Services entry to your client's QuickBooks Online company. The service is installation of a server that doesn't include the cost of the hardware. Here are some steps for getting the job done. 1. Select the Gear icon, select Products and Services, then select New 2. _____________________________________________ 3. In the Name field, type Server installation 4. In the Sales information field, type Server installation 5. Sale price/rate is $1250 6. In the Income Account drop-down, select Service/Fee Income 7. Select Save and close

Answers

Answer:  

The correct answer is Option 3: "Select Service"  

You have to select "Service" in the Second Step.  

Only after that, you'll be able to name the Service in the following step.  

Other options are invalid for a given question.

1. It manages the computer's memory and processes, as well as all of its software and hardware.
A. Application software
C. Graphical User Interface
B. Computer Operating System
D. Micro Computer ​

Answers

Answer:

B. Computer operating system

Explanation:

the operating system (or OS) manages all of the hardware and software in the computer, and allows hardware and software to communicate.

We can also figure this out by process of elimination: Application software is just a fancy way to say apps, Graphical User Interface (or GUI) are menus that allow a user to use the computer through a visual representation (what you interact with using your mouse), and microcomputer just means a small computer like a laptop or a phone.

You have a website that accepts input from users for creating customer accounts. Input on the form is passed to a database server where the user account information is stored. An attacker is able to insert database commands in the input fields and have those commands execute on the server. Which type of attack has occurred

Answers

Answer:

SQL injection

Explanation:

SQL (Structured Query Language) Injection, are vulnerabilities associated security of SQL web interface through which an attacker can intrude into the backend of a database by modifying the queries a web program sends to the database to which it is connected

Examples of SQL injection include: Subverting application logic, which uses modified queries to alter the logic of an application. UNION attacks, which allow the retrieval of data from different tables within a database. Retrieving hidden data, which allows the attacker to have additional query results through modification of a SQL query.

While using a Web-based order form, an attacker enters an unusually large value in the Quantity field. The value she entered is so large that it exceeds the maximum value supported by the variable type used to store the quantity in the Web application. This causes the value of the quantity variable to wrap around to the minimum possible value, which is a negative number. As a result, the Web application processes the order as a return instead of a purchase, and the attacker's account is refunded a large sum of money. What type of attack has occurred in this scenario

Answers

Answer: integer overflow

Explanation:

The type of attack has occurred in this scenario is a integer overflow. An integer overflow occurs when there's an attempt by an arithmetic operation to create a numeric value which is outside the range which the given numbers are able to represent.

In this, the integer overflow occurs when the result of the integer operation cannot be able to fit in the allocated memory space which then brings about an unexpected result.

Write a program that outputs "Hello World!".

Answers

print(“Hello World!”)

I hope this helps :) I’m sry is this what you wanted or were you looking for something else because I’m willing to help either way.

What is the Sparklines group for in Excel? to place charts in individual cells working with hyperlinks selecting font styles or themes formatting the appearance of the cells or tables

Answers

Answer:

A sparkline is a tiny chart in an Excel worksheet cell that provides a visual representation of data.

Define Fiber optic cable​

Answers

an assembly similar to an electrical cable, but containing one or more optical fibers that are used to carry light

Explanation:

An optical fiber is a flexible, transparent fiber made by drawing glass or plastic to a diameter slightly thicker than that of a human hair.

What is malware? a type of virus that spreads through a network connection a type of virus that targets programs and files any program designed to do harm a type of software designed to track activity online

Answers

a malware is any program designed to do harm

Explanation:

a malware (malicious software) is any software intentionally designed to cause damage to a computer,server, client or computer network.

how to stop programs from running at startup windows 10?

Answers

Just go into settings, type in startup apps, and it will take you to an area where you can select certain apps to start or not start when you reset / shut down / turn off your computer and turn it back on again.

Is there any quantum computer in India?​

Answers

yes, Qulabs was one of the first quantum computing startups in India.

_______________: a group of people working together to achieve specific goals.
a.
Grapevine
b.
Compatible
c.
Lateral
d.
Organization


Please select the best answer from the choices provided

A
B
C
D

Answers

Answer:

Organization

Explanation:

The other words have unrelated definitons to the definition given.

Answer:

organization

Explanation:

edge 2021

which route would be used to forward a packet with a source ip address of 192.168.10.1 and a destination ip address of 10.1.1.1?

Answers

Considering the available options, the route that would be used to forward a packet with a source IP address of 192.168.10.1 and a destination IP address of 10.1.1.1 is "O 10.1.1.0/24 [110/65] via 192.168.200.2, 00:01:20, Serial0/1/0"

What is Route in IP address?

IP routing generally transmits packets from one network to another host on another remote network.

The process of IP routing involves evaluating routing tables to specify the following hop address of the packet that should be sent.

IP Routing in this case

Considering the IP address in the question, the best match is the route in the routing table that contains the highest number of far-left matching bits.

Hence, in this case, it is concluded that the correct answer is "O 10.1.1.0/24 [110/65] via 192.168.200.2, 00:01:20, Serial0/1/0"

The available options are:

C 192.168.10.0/30 is directly connected, GigabitEthernet0/1

S 10.1.0.0/16 is directly connected, GigabitEthernet0/0

O 10.1.1.0/24 [110/65] via 192.168.200.2, 00:01:20, Serial0/1/0

S* 0.0.0.0/0 [1/0] via 172.16.1.1

Learn more about IP Routing here: https://brainly.com/question/6991121

When media is used to communicate with a very large audience, it is referred to as media.

Answers

Answer:

mass media

Explanation:

Answer:Mass media communication

Explanation:

Which SCSI standard allows for the technique known as “hot swapping”? Ultra SCSI Original SCSI Serial SCSI Fast-Wide SCSI

Answers

Answer:

Serial SCSI

Explanation:

Hot swapping can be defined as a process which typically involves fitting or replacing CD-ROM drive, hard-disk drive, power supply or other peripheral devices while a computer system is powered on. Thus, it allows for the installation or removal of a peripheral device from a computer while power is still being supplied to the computer i.e without having to shutdown the computer.

Serial SCSI is a SCSI standard which allows for the technique known as “hot swapping” because it's a point to point connection that is designed to move data to and from computer storage serially.

After a chart has been inserted and formatted, is it possible to change the data range it refers to or to add new rows of data?

No, additional data cannot be included in a chart once it has been created; the user should delete the chart and create a new chart.
Yes, click the Select Data button in the Data group under the Design tab to extend or reduce the data range.
Yes, click the chart, select the additional rows or columns of data to add, and press Enter on the keyboard.
Yes, double-click the chart and select Properties from the list; in the Properties box, insert the new data range to include in the chart.

Answers

Answer: Yes, click the Select Data button in the Data group under the Design tab to extend or reduce the data range.

Explanation:

Excel allows one to be able to update the data in a graph because the designers knew that information needs to be updated sometimes.

This is why there is an option to use the Data button in the Data group which is under the Design tab to increase or decrease the data range that is to be used in the chart which means that a new row of data could even be added.

can you fart and burp at the same time?

Answers

Answer:

Yes you can

Explanation:

Although farting and burping at the same time is a very rare phenomenon, it’s very possible. When this happens at the same time it is usually called a Furp.

This occurrence usually happens when there’s a lot of intake of foods which have a large percentage of gas . These gases often need to be expelled through processes such as burping and farting.

What happens when you drag a file from the Documents folder on the hard drive to the Pictures folder on the hard drive?

Answers

Answer:

The file changes its location within your hard drive while the file itself remains unchanged

Explanation:

The file's location will change from C:\Users\username\Documents to

C:\Users\username\Pictures

The router is physically located in a server room that requires an ID card to gain access. You've backed up the router configuration to a remote location in an encrypted file. You access the router configuration interface from your notebook computer by connecting it to the console port on the router. You've configured the management interface with a username of admin and a password of password. What should you do to increase the security of this device

Answers

Explanation:

the best thing to do is to create a personal password with a two time passcode for better security of the device

what is the working principle of computer?​

Answers

Answer:

input, process, output, storage

filters cannot perform what action on collected data?

Answers

Answer:

am at 50/50

Explanation:

filters cannot be perform to include shopping preferances.

Which line of code will allow the user to enter their current temperature to the nearest tenth of a degree?Group of answer choicesnum1 = input(""What is your temperature?"")num1 = int(input(""What is your temperature?"")num1 =float(input(""What is your temperature?""))1num = print(""What is your temperature?)

Answers

In programming we have different data types and in this question two data types was specified, Int and float, the only data type that can receive input to the nearest tenth of degree is float, hence, float(input(""What is your temperature?""))

Data types are use as place holders, we have the primitive and non-primitive data types

Example of data types are FloatArrayIntegerDoubleString

Learn more about data types at

https://brainly.com/question/179886

It is used to select specific menu options, drag and drop options and to draw something on screen.

Answers

Answer:

A mouse.

Explanation:

An input device can be defined as any device that is typically used for sending data to a computer system.

Generally, all of the output and input device of a computer are known as peripheral (external) devices and they provide data (informations) to the end users in various formats such as video, audio, texts, images etc.

Since input devices are peripheral (external) devices, they can be connected to the computer system wirelessly or through a wired-connection (cable).

Some examples of peripheral (external) devices are monitor, speakers, keyboard, printer, scanner, projector, mouse, etc.

A mouse is an input device that is designed and used to select specific menu options, drag and drop options and to draw something on screen.

how computer network reduce the cost of computer hardware? explain with example.​

Answers

Answer:

The biggest advantage of computer network is that the hardware components such as printers memory etc. can be shared by multiple computers. Hence it reduces the hardware cost of an organization

Answer:

One main method computer networking reduces the cost of computer hardware through the sharing of hardware component and resources including printers, faxes, memory space for data storage, processor, graphics capabilities, and internet access devices both locally, within a building and across sites

Computer network allows the sharing of a single resource mentioned above with several other computers, such that a single unit of each resource can be used by members of the same organization

Computer network also reduces the cost of additional space required where each computer is connected to its own components

Explanation:

Can someone answer this, I'll mark u the brialintest

Answers

Answer:

d

Explanation:

Decimal equivalent of "D" = (D) 13 × 16^1

what is font tag? write the name of attribute which is used in font tag​

Answers

Answer:

The font tag is used to change the color, size, and style of a text.The font tag is having three attributes called size, color, and face to customize your fonts. To change any of the font attributes at any time within your webpage, simply use the <font> tag.

who is Lady Augusta Ada Lovelace



Answers

Answer:

Lovelace was an English mathematician and writer, chiefly known for her work on Charles Babbage's proposed mechanical general-purpose computer, the Analytical Engine.

Other Questions
What is interpersonal please i beg for help !!!!!!!!!!! will mark brainlist help do in 20 min!!!!!!!!! What did Dorothea Dix do to bring reform to the state jail system?A) She witnessed horrible conditions in the prisons and wrote about what she saw.B) She wrote stories she heard from other people who visited prisons.C) She was arrested, put in jail, and later wrote about it.D) She became the head of all the prisons in the country. Research the future of energy production. What improvements to (or new methods of) electrical energy production are scientists currently developing? How will they improve on present methods of energy production (what makes these new methods better than the old)? What are the cons of these improvements? On March 21, 2021, Christine worked 5.5 hours on Job A-1, and 3 hours on general "overhead activities." Christine is paid $15 per hour. Overhead is applied based on $23 per direct labor hour. Additionally, on March 21 Job A-1 requisitioned and entered into production $290 of direct material. On March 21, Christine, while working on Job A-1 used $27 of indirect material. Indirect material is included in the overhead application rate. Use this information to determine the total cost that should have been recorded in the Work in Process for Job A-1 on March 21? How can I tutor at age 11? ce. fitness needs Total % Fill the table with some of the physical activities that you have encountered in your life and categorize them into three types by putting them in the appropriate column. Put a check mark () on the activities that may be done at home and mark ed - or oly 25 "X" the activities that may not Vigorous Activities Moderate Activities Light Activities TS 25 11. 25 6. 1. portant use endurance flexibility. Each one kind Also oility to do the miety helps 25 12. 7. 2. 100 13. 8. 3. nisk of info 14. 9. 4. e the I yet and Fical us. ise 15. 10. 5. Eithers i 4 terny Please Help!4.3.7 Discuss: Fighting Violence with Violence1. Discuss whether it is right to fight violence with violence.2. Was John Brown right in his actions? Consider the circumstances in 1859 and write a paragraph saying why you think he was or was not. How to solve for x using the equation: 12 = -4 (- 6x - 3) constant of proportionly in the equation 3y = 2x Determine each measure. M Write a 10 line poem about a girl from Ohio. We are more likely to remember the beginning and ending of your speech than what you say in the body because of the ________. help................. Convert 39/4 into a mixed number. Write an inequality that represents the graph. Isomers are molecules that have the SAME molecular formula, but their atoms are bonded in a different way. Draw the 5 isomers of cyclopentane, C5H10 using Line Structural Diagrams only. Which has a bigger population?A. North AmericaB. CanadaC. Latin America 60 minutes is 20% of minutes? this list of characteristics describes organisms in the _____ kingdom