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
Which of the following is used by credit card companies to determine APR?
kodGreya [7K]
Prime rate + credit history (APEX)
4 0
3 years ago
Read 2 more answers
Website administrators relay on ______, which is data such as the number of users who commented on, shared, viewed, or liked web
marin [14]

Answer:

b. analytics

Explanation:

-Hits are the amount of times that a website or program has been accessed.

-Analytics refers to the analysis of data to be able to make favorable decisions.

Cookies are files that are saved in a computer that are used to track the activity of a user in a website.

-Benchmaking is a technique in which a company compares its performance with businesses in the same industry.

According to this, the answer is that website administrators relay on analytics, which is data such as the number of users who commented on, shared, viewed, or liked webpage content.

3 0
2 years ago
Read 2 more answers
The benefit from dividing code into methods known as ________ is gained as follows: After you write code to perform a task once,
Fynjy0 [20]

Answer: B: Divide and Conquer

Explanation:

7 0
3 years ago
Which of the following statements is not true of web storage?
slavikrds [6]

Answer:

The data in web storage is passed to the server with every HTTP request.

Explanation:

There are basically two Web storage APIs Session storage and local storage.Both can store data up to 5MB. They are supported by every modern browser.You can store data in local storage indefinitely and for browser session in session storage.There is no data or information in HTTP request header.So we conclude that option 4 is the answer.

3 0
2 years ago
In GIMP, the ( ) displays the image that the user is currently working on
kotykmax [81]
I don'r know what your trying to use? GIMP is a free photo editing software just upload it to photobucket.
7 0
3 years ago
Other questions:
  • What is the type of account and normal balance of allowance for uncollectible accounts?
    13·2 answers
  • when you cross or enter traffic from a full stop, how much space should you allow on city streets? on the highway?
    11·1 answer
  • How many seconds are required to make a left turn and join traffic?​
    11·2 answers
  • Blank includes websites that encourage interaction and connection among people businesses and organizations
    14·2 answers
  • In no less than two paragraphs, explain the risks and compliance requirements of moving data and services into the cloud.
    11·1 answer
  • Suppose there is a class Alarm. Alarm has two class variables, code which contains a String value representing the code that dea
    12·1 answer
  • Binary Numbers and Conversion 1. Complete the following decimal-to-binary number conversions. a) 17 (10) b) 34 (10) c) 58 (10) d
    9·1 answer
  • What is the purpose of using variables in programming?
    11·1 answer
  • In Secure Electronic Transaction, the purpose of Dual Signature is to link two messages that are intended for two different reci
    5·1 answer
  • Which of the following is a key feature of a relational database?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!