Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Solved Assignments
Asked Questions
Answered Questions
describe interfaces in java langaugeinterfaces are the further level of abstraction an interface is like a class along with nothing but abstract
explain abstract method in javajava permits methods and classes to be declared abstract an abstract method is not actually implemented in the class
describe final argumentsat last you can declare in which method arguments are final this means that the techniques will not directly change them
explain final fields you may also declare fields to be final this is not the similar thing as declaring a method or class to be final while a field
describe the final keyword the final keyword is used in various different contexts as a modifier meaning in which what it modifies cannot be changed
give an examples of javalangmath methodshere is an instance program in which exercises most of the routines in javalangmath if your high school math
explain the library javalangmath the java class library is huge we will not cover it all presently in fact the remaining eight classes will focus
write the hashcode method of javalangobjectanytime you override equals you should also override hashcode the hashcode method should ideally return
explain the equals methodthe equals method of javalangobject acts the similar as the operator that is it tests for object identity rather than
explain the methods of javalangobjectjavalangobject gives a number of methods that are general to all objects tostring is the most general such
describe the javalang package each package describes a number of classes exceptions interfaces and errors for instance in java 11 the javalang
why you dont need to import javalangthere is one exception to the import rule all classes in the javalang package are imported by default therefore
name conflicts when importing packagesit is possible which you will try to import a package which contains classes in which have the similar name as
describe importing classes in javafully qualified names such as javaneturl are not the most convenient thing to have to type you can use the shorter
give the example of using a class from the class library you use the javaneturl class only like youd use any other class along with these methods in
explain the reading documentation for a class in the class libraryfor instance lets suppose you need to use the url class in the javanet package
what is documentation for the class librarysun gives a large amount of documentation for the classes interfaces and exceptions in the class library
explain the javanet packageeach package describes a number of classes interfaces exceptions and errors for instance the javanet package contains
list the java class libraryjava holds an extensive library of pre-written classes you can use in your programs these classes are separated into
when should a method be staticbullneither reads from nor writes to example fields bullindependent of the state of the object bullmathematical methods
what is invoking static methodsif a method or field is declared static you access it through using the class name rather than a reference to a
give an example of class or static membersbelow is a car class along with such a speedlimit field and getspeedlimit method public class car private
describe the class or static members a method or a field in a java program could be declared static that means the member belongs to the class rather
explain the rules for tostring methods tostring methods should return a single line of text that does not contain any carriage returns or linefeeds
give a example of using tostring methods below is a version of cartest in which uses tostring and systemoutprintln instead of printing the fields in