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
liq [111]
3 years ago
15

What does the following code print?

Computers and Technology
1 answer:
Crank3 years ago
3 0

Answer:

It throws an error.

the public class needs a name.

like this:

public class G{ public static void main(String[] args) {

   int x=5 , y = 10;

   if (x>5 && y>=2) System.out.println("Class 1");

   else if (x<14 || y>5) System.out.println(" Class 2");

   else System.out.println(" Class 3"); }// end of main

   }

if you give the class a name and format it, you get:

Class 2

Explanation:

You might be interested in
The following pieces are known as (image shown above)
cestrela7 [59]

Answer:

Conjunction operators  

Explanation:

4 0
2 years ago
Read 2 more answers
What are your considerations in making a derivative ict content ti effectively communicate or present data or information?
Sever21 [200]

Answer:

1) Design

2)Content

Explanation:

The considerations in making a derivative ICT content to effectively

communicate or present data or information include the Design.

The design is what helps to portray and make the content more appealing and appropriate for the end users.

The content is the main body and it is vital in helping to provide the required information.

7 0
2 years ago
An app builder wants to show groups as the last navigation menu item in the Salesforce1 mobile app. However, the app builder is
tatyana61 [14]

Answer:

Option B is the correct answer.

Explanation:

Because of an app builder and they need to display the groups as the final menu items of the navigation in the software of the mobile. Then, they unable to select those groups in which the items list on the menu. So, that's why the following groups are not in the list of the selected navigation menu.

Other option is not true because they are not according to the following statement.

8 0
3 years ago
program students can get credit for their high school classes as long as they take a specific courses that a college will accept
USPshnik [31]

AP courses deliver college credits

4 0
3 years ago
Read 2 more answers
4. Write an interface ObjectWithTwoParameters which has a method specification: double area (double d1, double d2) which returns
il63 [147K]

Answer:

The java program for the given scenario is as follows.

import java.util.*;

//interface with method area

interface ObjectWithTwoParameters

{

double area (double d1, double d2);

}

class RectangleClass implements ObjectWithTwoParameters

{

//overriding area()

public double area (double d1, double d2)

{

return d1*d2;

}

}

class TriangleClass implements ObjectWithTwoParameters

{

//overriding area()

public double area (double d1, double d2)

{

return (d1*d2)/2;

}  

}

class CylinderClass implements ObjectWithTwoParameters

{

public double area (double d1, double d2)

{

return ( 2*3.14*d1*d1 + d2*(2*3.14*d1) );

}

}

public class Test

{

public static void main(String[] args)

{

//area displayed for all three shapes

ObjectWithTwoParameters r = new RectangleClass();

double arear = r.area(2, 3);

System.out.println("Area of rectangle: "+arear);

ObjectWithTwoParameters t = new TriangleClass();

double areat = t.area(4,5);

System.out.println("Area of triangle: "+areat);

ObjectWithTwoParameters c = new CylinderClass();

double areac = c.area(6,7);

System.out.println("Area of cylinder: "+areac);

}

}

OUTPUT

Area of rectangle: 6.0

Area of triangle: 10.0

Area of cylinder: 489.84

Explanation:

1. The program fulfils all the mentioned requirements.

2. The program contains one interface, ObjectWithTwoParameters, three classes which implement that interface, RectangleClass, TriangleClass and CylinderClass, and one demo class, Test, containing the main method.

3. The method in the interface has no access specifier.

4. The overridden methods in the three classes have public access specifier.

5. No additional variables have been declared.

6. The test class having the main() method is declared public.

7. The area of the rectangle, triangle and the cylinder have been computed as per the respective formulae.

8. The interface is similar to a class which can have only declarations of both, variables and methods. No method can be defined inside an interface.

9. The other classes use the methods of the interface by implementing the interface using the keyword, implements.

10. The object is created using the name of the interface as shown.

ObjectWithTwoParameters r = new RectangleClass();

8 0
3 years ago
Other questions:
  • The ____ category of apps makes the computer easier for blind people to use.
    9·1 answer
  • Peter has recently bought a media player and a digital camera he wants to buy a memory card and then use devices which memory do
    11·2 answers
  • Stuart wants to delete some text from a slide. What should Stuart do?A. From the Review tab, choose Highlight text and then pres
    7·2 answers
  • Why are ethics important in PR?
    8·1 answer
  • A Raycast returns a float that tells you how far away an Object is
    8·1 answer
  • An interface does not have ____.
    13·1 answer
  • What do modern CPUs use to simulate the performance of multiple processors within one processor?
    9·2 answers
  • If we want to access files located in a directory on a remote server, which of these options would we use?
    9·2 answers
  • What is the best stratiget to avoid paying intrest in your credit cared
    13·1 answer
  • WHAT IS A GOOD APP FOR REMOVING VIRUSES AND IT YOU DONT HAVE TO PAY MUCH FOR IT ????? PLEASE HELP ME
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!