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
serg [7]
3 years ago
8

Which of these is a consequnce of removing a method declaration from an interface after it has been implemented?a. There are no

consequences, interfaces can always be modified to remove methods. b. The method definitions would need to be removed from every subclass that implements the interface.c. Code would breakwhenever an interface reference is used to polymorphicaly call the method in an instance of an implementing class
Computers and Technology
1 answer:
user100 [1]3 years ago
8 0

Answer:

Option (a)

Explanation:

It will not produce any error as if a function is declared in the interface and then implemented by a class same function can be defined, but if that declaration is removed then also that class will consider that method as new declaration and it won't produce any type of error. For example : if following code of Java  is run -

interface printing{  

   void print_it();   //method declared

   }  

class Student implements printing{  

public void print_it()    //method implemented

{

   System.out.println("Hello World");

}      

public static void main(String args[]){  

Student obj = new Student();  

obj.print_it();    //method called

   }  

}

OUTPUT :

Hello world

But if the program is altered and declaration of print_it is deleted from the interface like following :

interface printing{  

//method is removed from here

   }  

class Student implements printing{  

public void print_it()    //method implemented

{

   System.out.println("Hello World");

}      

public static void main(String args[]){  

Student obj = new Student();  

obj.print_it();    //method called

   }  

}

Still no error is generated and same output is displayed as before.

You might be interested in
Liquid water can change into a gas and become part of the air. When water is a gas, what is it called?
liq [111]
The term that is used to describe water in the gaseous state would be C. Water vapour.
3 0
3 years ago
To join two or more objects to make a larger whole is to _____________ them.
Masja [62]
C. Integrate is the answer PLZ MARK AS BRAINLIEST
6 0
3 years ago
Read 2 more answers
18. Applying what formatting option to your Excel workbook will make it easier to read when printed out?
Sergeu [11.5K]
Depending on the data all answers can be used to make it easier to read. Without more info I would go with Borders (D) since they are the best way to group the data when printed, especially if the print is in color.

Alignment would be the correct answer only if the data goes out of cell boundaries. Font Color usually makes it harder to read because of bad contrast and finally changing the Font Style has a minimal effect since the default one is already pretty readable.
7 0
3 years ago
Create an java application that will process 3-digit numbers as follows:
alisha [4.7K]

Answer:

I dont not not the frsidjkbzxc.n bzl,b vbsv,gcjdvc,

Explanation:

5 0
3 years ago
A leading global vendor of computer software, hardware for computer, mobile and gaming systems, and
V125BC [204]

Answer:

Microsoft

Explanation:

5 0
2 years ago
Other questions:
  • A bitmap picture can be represented by hexadecimal numbers. Each two-digit hexadecimal number represents a row. To convert a num
    14·1 answer
  • External hard disks use different technology than internal hard disks. ture or false
    6·1 answer
  • A coworker asks your opinion about how to minimize ActiveX attacks while she browses the Internet using Internet Explorer. The c
    14·1 answer
  • Downloading files is safe for most types of files except Select one: a. documents. b. pictures. c. executable files. d. music fi
    7·1 answer
  • i set up an account and paid the yearly fee, now it's asking me to join. i've tried to log in and brainly isn't accepting my ema
    8·1 answer
  • Anthony is responsible for tuning his organization's intrusion detection system. He notices that the system reports an intrusion
    8·1 answer
  • The federal government is the largest employer of cybersecurity professionals true or false
    5·1 answer
  • Can you please help me
    9·1 answer
  • (C) Describe about the different types of computer<br> peripherals and memory devices.
    9·1 answer
  • PlanthelogicforLungi’sapplicationusingpseudocode.Thelogicneedstosatisfythefollowingneeds:TheapplicationwillneedtoallowLungitoen
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!