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]
2 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]2 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
How might a company gain followers on Twitter?
Tresset [83]
By sending persuasive / informable and interesting posts to gain followers.
3 0
3 years ago
I need help ASAP please
Sunny_sXe [5.5K]

Answer:

The best way is 2 and the worst is 1

Explanation:

7 0
3 years ago
Read 2 more answers
Which of the following is considered a benefit of using simulation programs? a. They allow users to experience potentially dange
erica [24]

Answer:

All of the above

Explanation:

7 0
3 years ago
Which two factors most influenced the growth of the Internet during the 1970s?
eduard

Answer:

The answer is "increase in the power of public universities and increased appreciation for a liberal arts education". DARPA and Russia had nothing to do with this. Yes, the computer hardware improvement led to a growth, but National Science Foundation funding in 1981, and hence this is also not an option. And electrical power supply had nothing to do with this. Hence, the above answer. as the concept of the internet is based on liberal arts of education, to impart practical and intellectual skillsets, and hence to grow the social responsibility among the citizens of the whole world. Also, the power of public universities had a big role to play definitely, and this was confirmed from Pentagon as well then when the question was raised, is this due to the risk of a nuclear attack.

Many people think that the main reason was the nuclear attack threat, but that was not an issue definitely. Actually this was the time of liberalization, and the power of the public universities was increased. Hence, they got the chance to share the information of various sorts with the people, and in the process internet started expanding.

Explanation:

The answer is self explanatory.

8 0
2 years ago
Read 2 more answers
Problem 1. MST - Prim's and Kruskal's algorithms
Juli2301 [7.4K]
Or maybe not Encryption converts the data in a database to a format that is indecipherable to unauthorized users who attempt to bypass the DBMS.

a. True
b. False
7 0
3 years ago
Other questions:
  • Task 2 Design a 1st order low-pass filter with cutoff frequency 1kHz, 1) with roll-off and 2) without roll-off. For each filter,
    10·1 answer
  • 4. Write an interface ObjectWithTwoParameters which has a method specification: double area (double d1, double d2) which returns
    9·1 answer
  • Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command? [BEGIN
    5·1 answer
  • Which best describes the benefits of renting a home
    12·2 answers
  • Answer the queston...........​
    7·2 answers
  • Technology changes rapidly. Do you think the development of new technology will slow down at some point? At some point will cons
    12·1 answer
  • It is easier to make an object move across the screen by using the tweening function rather than creating each individual frame
    5·1 answer
  • Pls help me computer science discoveries
    5·1 answer
  • Double clicking the top right corner of a document will
    12·1 answer
  • You are configuring a network attached storage (nas) appliance. what file sharing protocol(s) could you use to allow access to w
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!