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
Karo-lina-s [1.5K]
3 years ago
12

In the given switch statement, what will be displayed if the value of var is 3? switch(var) { case 1: System.out.println("Apple"

); break; case 2: System.out.println("Banana"); break; case 3: System.out.println("Peach"); case 4: System.out.println("Pear"); case 5: System.out.println("Pineapple"); break; default : System.out.println("Cantaloupe"); break; } A. Peach Peach B. Pear Peach C. Pear Pineapple D. None of the above.
Computers and Technology
1 answer:
olga_2 [115]3 years ago
3 0

Answer:

The output of the given program is  

Peach Pear Pineapple.

Explanation:

since the value of var is so control will move to the case 3 directly and executed the statement inside the case 3 so it will print "Peach" in window after that their is no break statement in the case 3 the control moves the case 4 and executed the statement inside the case 4 so it will print "Pear" in window again there is no break statement in the case 4 the control moves the case 5 and executed the statement inside the case 5 so it will print "Pineapple".Finally, the break statement is reached the execution of the program is stopped.

You might be interested in
What is the difference between an html opening tag and a closing tag?.
Doss [256]

Answer:

Explanation:

Generally speaking, there are two kinds of tags - opening tags: <html> and closing tags: </html>. The only difference between an opening tag and a closing tag is the forward slash "/". You label content by putting it between an opening tag and a closing tag.

HTML is all about elements.

7 0
2 years ago
SUMMING THE TRIPLES OF THE EVEN INTEGERS FROM 2 THROUGH 10) Starting with a list containing 1 through 10, use filter, map and su
Anestetic [448]

Answer:

numbers=list(range(1,11)) #creating the list

even_numbers=list(filter(lambda x: x%2==0, numbers)) #filtering out the even numbers using filter()

triples=list(map(lambda x:x*3 ,even_numbers)) #calculating the triples of each even number using map

total_triples=sum(triples) #calculatting the sum

numbers=list(range(1,11)) #creating the list

even_numbers=[x for x in numbers if x%2==0] #filtering out the even numbers using list comprehension

triples=[x*3 for x in even_numbers] #calculating the triples of each even number using list comprehension

total_triples=sum(triples) #calculating the sum.

Explanation:

Go to the page where you are going to write the code, name the file as 1.py, and copy and paste the following code;

numbers=list(range(1,11)) #creating the list

even_numbers=list(filter(lambda x: x%2==0, numbers)) #filtering out the even numbers using filter()

triples=list(map(lambda x:x*3 ,even_numbers)) #calculating the triples of each even number using map

total_triples=sum(triples) #calculatting the sum

numbers=list(range(1,11)) #creating the list

even_numbers=[x for x in numbers if x%2==0] #filtering out the even numbers using list comprehension

triples=[x*3 for x in even_numbers] #calculating the triples of each even number using list comprehension

total_triples=sum(triples) #calculating the sum

7 0
4 years ago
I need help Asap!!! So the question is "Compare and contrast Web page and Websites". ​
777dan777 [17]

Answer:

A website is a mix of web pages while a web page is a single entity.

Explanation:

4 0
3 years ago
True/False: A datasum can be generated for any width of data. For example, we can create an 8, 16, or 32 bit datasum for 8, 16,
Zolol [24]

Answer:

true

Explanation:

6 0
3 years ago
What term defines Internet applications that help people connect with each other through a virtual environment by providing them
DaniilM [7]
As for this problem, the most probable and the most likely answer to this together with the presented options would be D. Social Networks.

Social networks is the term that defines Internet applications that help people connect with each other through a virtual environment by providing them with a collection of online tools. These tools include the instant messaging, the uploading of pictures and other tools that is found useful in connecting with people online. This has become phenomenon and the most popular social network as of the moment would be Facebook.
6 0
4 years ago
Other questions:
  • Clicking on this will minimize all open windows.
    5·2 answers
  • What is the program that searches through data bases?
    10·1 answer
  • Does players report you on Mobile legends bang bang for playing your own Music while your playing yes or no
    11·1 answer
  • Melinda completed the Computer Programming Aptitude Test when she applied for a position with Beta Electronics. Six months later
    14·1 answer
  • Knowledge management software helps companies preserve the knowledge gained through the use of information so that future users
    15·2 answers
  • Why is information broken down into packets
    15·1 answer
  • Sergio needs to tell his team about some negative feedback from a client. The team has been
    14·1 answer
  • Write a MY SQL query to display the name and hire date of all employees who were hired in 1992.
    9·1 answer
  • 4. True or False: In order to use wi-fi signal/network, you have to remain seated in one spot.
    6·1 answer
  • ____ is an example of a set of prewritten classes that allows you to access data stored in a database.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!