Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the output of the following code? public interface yourInterface { int x = 1 0 , y = 2 0 void printName (

What is the output of the following code?
public interface yourInterface {
int x=10,y=20
void printName();
void printDate();
}
abstract class yourAbstarct implements
yourInterface {
int x=100;
public void printName(){
System.out.print("YourAbstaret"+"");
}
}
class yourClass extends yourAbstarct {
int y=200;
public void printName0{
System.out.print("Name"+"");
}
public void printDate (
System.out.print("Date"+""');
}
public static void main(String[] args){
yourInterface s= new yourClass();
s.printName();
s.printDate():
System.out.print(s.x +"");
System.out.print(s.y +");
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Which of the following is the host server name

Answered: 1 week ago

Question

1. Identify six different types of history.

Answered: 1 week ago

Question

2. Define the grand narrative.

Answered: 1 week ago

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago