Answer:
Following are the code to this question:
public class M//defining class M
{
public static void main(String[] as)//defining main method
{
int i,j;//defining integer variable
for (i= 1; i <=10; i++)//defining for loop for print column
{
for (j = 1; j<=15; j++)//defining for loop for print rows
{
System.out.print("#");//print # value
}
System.out.println();//print space
}
}
}
Output:
###############
###############
###############
###############
###############
###############
###############
###############
###############
###############
Explanation:
The code defines a class "M" and the main method is defined within a class and two integer variables I and j" are defined within the primary procedure, while the next step defines two for a loop.
In the first loop, the column value is printed, and a further loop that prints the row value is declared inside the loop.
You literally don’t do anything you’re just like dead of sun
Answer:
The code to this question can be given as:
Code:
public interface Test //define interface
{
public abstract Duration getDuration(); //define method
getDuration.
public abstract Result check(int a);
//define method
check .
public abstract double getScore();
//define method getScore.
}
Explanation:
In the above code, we define an interface that is "Test" inside an interface, we define three methods that can be defined as:
- First, we define a method that is "getDuration" that method returns Duration as an object.
- Second, we define a method that is "check" this method accepts an integer parameter that is a and return Result.
- The third method is "getScore" this method will return a double value.