Answer:
import java.util.Scanner;
public class DashLine {
public static void main(String[] args) {
// Declaring variables
int n;
/*
* Creating an Scanner class object which is used to get the inputs
* entered by the user
*/
Scanner sc = new Scanner(System.in);
// Getting the input entered by the user
System.out.print("Enter a number :");
n = sc.nextInt();
// calling the method by passing the user entered input as argument
dashedLine(n);
}
//This method will print the dashed line for number greater than zer
private static void dashedLine(int n) {
if (n > 0) {
for (int i = 1; i <= n; i++) {
System.out.print("-");
}
System.out.println();
}
}
}
Explanation:
Answer:
Cultural lag
Explanation:
Cultural lag is a situation where by a society experiences technological development at a rate faster than the development that occurs in culture and general way of life.
A very good example is that it takes a longtime before cultural development can match up with technological developments and advancements thus leading to social problems due to lag. The cultural lag theory was formed in 1922 by William F Ogburn a sociologist.
Answer: A class that implement an interface must contain methods for all abstract methods in the interface. Otherwise, the class must be declared as abstract.
Explanation:
It is necessary to implement all the abstract method that are present in the interface. Basically, this is one of the rule of abstract method. As, abstract method is define as without any implementation.
If any class contain abstract method then, it must be declare as abstract. Therefore, if a class are not implemented an interface method then, it should be declare as abstract.