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
Alinara [238K]
3 years ago
13

Which technique/concept can be use toimplement multiple inheritances in java?

Computers and Technology
1 answer:
LiRa [457]3 years ago
8 0

Answer:

Interface

Explanation:

Java does not supports multiple inheritance by class, but we can implement multiple inharitacnce in  java using interface, with interface we uses implements keyword.

Example-

Declare interface like below code -

interface parent{

}

and use in child class like below code -

class Child1 implements interface{

}

class Child2 implements interface{

}

You might be interested in
Use the Date object and the Array object to determine and diplay information about the current date on your webpage. Your output
Mnenie [13.5K]

Answer:

  1. var today = new Date();
  2. var dateComp = [];
  3. dateComp[0] = today.getDate();
  4. dateComp[1] = today.getMonth();
  5. dateComp[2] = today.getFullYear();
  6. switch(dateComp[1]){
  7.    case 0:
  8.        console.log("Jan " + dateComp[0] + "," + dateComp[2])
  9.        break;
  10.    case 1:
  11.        console.log("Feb " + dateComp[0] + "," + dateComp[2])
  12.        break;
  13.    case 2:
  14.        console.log("Mar " + dateComp[0] + "," + dateComp[2])
  15.        break;
  16.    case 3:
  17.        console.log("Apr " + dateComp[0] + "," + dateComp[2])
  18.        break;
  19.    case 4:
  20.        console.log("May " + dateComp[0] + "," + dateComp[2])
  21.        break;
  22.    case 5:
  23.        console.log("Jun " + dateComp[0] + "," + dateComp[2])
  24.        break;
  25.    case 6:
  26.        console.log("Jul " + dateComp[0] + "," + dateComp[2])
  27.        break;
  28.    case 7:
  29.        console.log("Aug " + dateComp[0] + "," + dateComp[2])
  30.        break;
  31.    case 8:
  32.        console.log("Sept " + dateComp[0] + "," + dateComp[2])
  33.        break;
  34.    case 9:
  35.        console.log("Oct " + dateComp[0] + "," + dateComp[2])
  36.        break;
  37.    case 10:
  38.        console.log("Nov " + dateComp[0] + "," + dateComp[2])
  39.        break;
  40.    case 11:
  41.        console.log("Dec " + dateComp[0] + "," + dateComp[2])
  42.        break;
  43. }

Explanation:

The solution code is written in JavaScript.

Firstly, create a Date object (Line 1). The date object will automatically capture the current date and time.

Next create an array dateComp to hold the day, month and year (Line 3 -5). We use the getDate method to get current day, getMonth method for current month and getFullYear method for current year.

This is important to note that the getMonth method will return the value range from 0 - 11 with the Jan is represented as 0, Feb is 1 and so forth. Presume we intend to display the date using the format "month day, year", we can create a switch structure to check the month value which is range from 0 to 11. If month value is 0, generate string Jan + current day + "," + current year. We generate the date string based on different switch cases (7 - 44). We shall see the output similar to the date string as shown below:

Apr 12,2020

6 0
3 years ago
What does the following code alert?
goldenfox [79]

It is just a declaration of an object variable, <em>person</em>, in JavaScript. Within a <em>person</em> object, there are key:value pairs. The code that you  shared has the following keys: name, age, and favouriteFood, whereas the values of those keys are: Mike, 25, and pizza.


There is <em>no</em> alert statement in this code snippet; therefore, it <em>will not alert </em>anything. This code contains only a variable called <em>person, </em>and that's it!

5 0
3 years ago
Read 2 more answers
The reason for prioritizing your work is to get the
7nadin3 [17]

Answer:

a

Explanation:

3 0
2 years ago
Type the correct answer in the box. Spell all words correctly. Code in which server-side language can be embedded into an HTML d
Zarrin [17]

Answer:

What does the letter T in SMART goal represent? The letter T in SMART goal stands for .

Explanation:

Type the correct answer in the box. Spell all words correctly. What does the letter T in SMART goal represent? The letter T in SMART goal stands for .

A:

The correct answer would be, Time based goals.The letter T in SMART goal represents Time based Goals.Explanation:SMART goals is an approach in Business Administration. It is basic…

6 0
2 years ago
Read 2 more answers
What is the name of the hardware device that is used to write the data from hard disk to CD​
mart [117]

it is called a disk drive

4 0
2 years ago
Read 2 more answers
Other questions:
  • When you were configuring Encrypting File System (EFS) in the lab, a __________ on the Documents folder in the File Explorer ind
    5·1 answer
  • What does the headgear of a mine do
    6·2 answers
  • Public static String doSomething(String s) { final String BLANK = " "; //BLANK contains a single space String str = ""; //empty
    6·1 answer
  • 6. Why did he choose to install the window not totally plumb?
    13·1 answer
  • Explain what middleware is. Name a common middleware in two-tier client/server architecture for database applications.
    10·1 answer
  • Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the day, s
    11·1 answer
  • Which of the following statements are true?
    11·1 answer
  • Why is failure important when you are designing a solution to a problem?
    6·2 answers
  • Which of the following substances increases in quantity during repititive muscle contraction during oxygen deficti ?
    11·1 answer
  • An organization is conducting a study to see if hazardous waste sites pose health risks for cancer or other conditions, such as
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!