Given: 11. public class Person { 12. private String name, comment; 13. private int age; 14. public Person(String n, int a, String c) { 15. name = n; age = a; comment = c; 16. } 17. public boolean equals(Object o) { 18. if (! (o instanceof Person)) return false; 19, Person p = (Person)o; 20. return age == p.age && name.equals(p.name); 21. } 22. } What is the appropriate definition of the hashCode method in class Person?
return super.hashCode();
return name.hashCode() + age * 7;
return name.hashCode() + comment.hashCode() / 2;
return name.hashCode() + comment.hashCode() / 2 - age * 3;
In which system call we have to use file descriptor to identify the file.
fchmode()
fchmod()
chmod()
All the above.
which command gives the operating system's version number?
uname -v
uname -p
uname -s
uname -r
Which command is used to create recursive directories.2) mkdir -v x/y x/y/z3) mkdir -p x/y x/y/z4) mkdir x x/y x/y/z
i and ii
i,ii,iv
iii,iv
Which command is used to get the entire line using awk?
$1
$0
$*
$#
which command is used to print the lines which are having only one '\'
grep "^\$" filename
grep "^\\$" filename
J2EE application only a web-based
True
False
JavaBeans Are J2EE components
HTML page a web component
Abstract method can a have the static qualifier