One which is open source, linux based
Answer: Constructors can specify parameters but not return types.
Explanation:
public class Student {
int roll_no;
public Student(int a) {
roll_no = a;
}
public static void main(String[] args) {
Student abs = new Student(10);
System.out.println(abc.roll_no);
}
}
In the above code we have illustrated the working of constructors. We have a class with the name Student. then a constructor is created of the class called as the class constructor. In the main we create an object of the class and with this object we invoke the constructor and also pass a parameter. Here in the code we are passing the roll no of the student.
So we can say that constructor is called during the runtime when the object created invokes the constructor so a constructor can have many arguments but it does not have a return type.
Answer:
Check the explanation
Explanation:
relatives.pl
/* Facts */
male(ace).
male(john).
male(jack).
male(bill).
male(david).
male(brown).
male(daniel).
female(cecil).
female(aba).
female(cathy).
parent(john,ace)
parent(tom,john)
parent(jack,john)
parent(bill,aba)
parent(brown,aba)
parent(cecil,bill)
parent(david,cecil)
parent(cathy,brown)
parent(daniel,cathy)
parent(ellen,daniel)
/* parent(X,Y) -> Y is parent of X */
wife(ceceil,jack) /* wife(X,Y) -> Y is wife of X */
Answer of 2-2
Considering all facts and rules answer will be daniel,ellen.
Answer 2-3
Considering all facts and rules answer will be bill.
Answer 2-4
Considering all facts and rules X will be john and y will be cecil.
Answer 2-5
Considering all facts and rules X will be tom and y will be david.
Answer:
I think it's C) The semi-colon should be a colon.
Explanation:
Padding i believe,i got it off quizlet