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
PilotLPTM [1.2K]
3 years ago
10

What can you say about the following Java class definition?

Computers and Technology
1 answer:
IrinaK [193]3 years ago
3 0

Answer:

The class is called MyApp which inherits from JFrame and implements the ActionListener interface.

Explanation:

The class is called MyApp which extends the swing class JFrame and implements the ActionListener interface for event handling. As a results it needs to implement a method called actionPerformed for handling the relevant events that may be raised from the user interface. Since it extends JFrame, it has access to all the public and protected methods defined in JFrame(for example setTitle to set the title of the frame).

You might be interested in
write a java program that prompts the user to enter scores (each number an integer from 0 to 10) and prints the following output
Vladimir [108]

Answer:

Explanation:

The following is written in Java. It continues asking the user for inputs until they enter a -1. Then it saves all the values into an array and calculates the number of values entered, the highest, and lowest, and prints all the variables to the screen. The code was tested and the output can be seen in the attached image below.

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int count = 0;

       int highest, lowest;

       ArrayList<Integer> myArr = new ArrayList<>();

       while (true) {

           System.out.println("Enter a number [0-10] or -1 to exit");

           int num = in.nextInt();

           if (num != -1) {

               if ((num >= 0) && (num <= 10)) {

                   count+= 1;

                   myArr.add(num);

               } else {

                   System.out.println("Wrong Value");

               }

           } else {

               break;

           }

       }

       if (myArr.size() > 3) {

           highest = myArr.get(0);

           lowest = myArr.get(0);

           for (int x: myArr) {

               if (x > highest) {

                   highest = x;

               }

               if (x < lowest) {

                   lowest = x;

               }

           }

           System.out.println("Number of Elements: " + count);

           System.out.println("Highest: " + highest);

           System.out.println("Lowest : " + lowest);

       } else {

           System.out.println("Number of Elements: " + count);

           System.out.println("No Highest or Lowest Elements");

       }

   }

}

4 0
2 years ago
The last time period the federal government of these United States ran a budget surplus was ________.
lina2011 [118]
Your answer is a 1998-2001
3 0
3 years ago
which feature will configuring a SOHO network in which all ports on the public untrusted network will be forwarded to one workst
Ugo [173]

Answer:

Demilitarized zone (DMZ).

Explanation:

Demilitarized zone is a kind of security assurance scheme used by network administrator to detect network breach even before it gets to the secured network.

The private LAN is protected with a firewall and a DMZ is configured to allow access by untrusted users, on another workstation, which is a duplicate of the companies private local address.

7 0
3 years ago
You plan to use the Fill Down feature on a formula and you need to keep a cell reference the same. Which of the following format
yKpoI14uk [10]
A $E19 I now it because I am in college
6 0
3 years ago
Read 2 more answers
James would like to send a document he has saved on the hard drive to coworkers and Ireland Brazil and India. These coworkers ha
frozen [14]
Email the document to them ?

8 0
3 years ago
Read 2 more answers
Other questions:
  • In this code, identify the repeated pattern and replace it with a function called month_days, that receives the name of the mont
    14·1 answer
  • The Olympic Games that people celebrate today are much different from the Olympics that began in ancient Greece. When the Olympi
    13·2 answers
  • What are the Positive and negative sites of the internet
    14·1 answer
  • 1. Which of the following options will allow you to insert a quick table? (1 point) Insert ribbon &gt; Shapes drop-down menu
    6·2 answers
  • Which statement is true about wikis? Wikihow is an online dictionary that aims to define words. A wiki cannot be used in an orga
    12·2 answers
  • Structure for forloop?
    10·1 answer
  • First calculating device​
    12·2 answers
  • Suppose that you have the following declaration:
    7·1 answer
  • Pie charts are best used for
    5·1 answer
  • Jamie plans to sell his pottery designs through his website. If he also wants to launch a mobile app to reach more people, which
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!