Go:
1 2 3 R4R --->Java --->> SCJP1.5 Chapter02 --> Sun Java Certification
Page 1
Question:Abstract Classes
Post Your View
AnswersAbstract class is bassically never be instentiated. its mainly pupose of the mission of life .thats the soul purpose of them . We have a code for the abstract class :
abstract class Car {
private double price;
private Color carColor;
private String model;
private String year;
public abstract More --- >>
By:UMANG Date:24.02.09
Question:Accessing Static Methods and Variables
Post Your View
AnswersAccessng Static method is very importent for the any code .when instance of the classes in the code is absence then how to code is appropiate thats y we can use the accessing static method for make a appropiate cade. So in this way we access a static method (or static variable) is to use the dot ope More --- >>
By:UMANG Date:25.02.09
Question:Class Access
Post Your View
AnswersWhen one class access to the another class , It means first class can do one of three things :
> Create an instance of class B
> Extend class B (in other words, become a subclass of class B).
> Access certain methods and variables within class B, depending on the access control of those methods More --- >>
By:UMANG Date:24.02.09
Question:Class Declarations and Modifiers
Post Your View
AnswersWhne we would like to declare the class and modies it then we use nested or inner class . some rules are there :
> each sourse code file have a one public class only.
> File name and class name should be same .
> packege should be first line in the sourse code if class is a part of package .
>I More --- >>
By:UMANG Date:24.02.09
Question:Creating an Abstract Superclass and Concrete Subclass
Post Your View
Answerswe have a example . there are 1 of abstract supar class which name is fruits and a concrete subclass which name is Apple. Supar class which is belonging to a package.
We have a method which is following as :
> Create the superclass as follows :
package food;
public abstract class Fruit{ / More --- >>
By:UMANG Date:24.02.09
Question:Declaration Rules
Post Your View
AnswersDeclaration rules is bassically a identifying correctly constructed source files, package declarations, import statements, class declarations, interface declarations, method
declarations, variable declarations, and identifiers. More --- >>
By:UMANG Date:25.02.09
Question:Declarations and Modifiers
Post Your View
AnswersDeclare class bassically a nested class , its also a method , We can also say instance variable and static variables automatic variables also.These are variables making appropiatelly use of all permitted modifiers.modifiers are like :
> Public,
> Final,
> Static,
> Abstract
W More --- >>
By:UMANG Date:24.02.09
Question:Declaring an Interface
Post Your View
AnswersWhen we create an interface We can define the functioning of the class i mean to say we can define whats the exactly the call can do .without saying anything about how the class will do it. INterface is abssically a contract.for the example we have a interface which name is Bounceable.Any class type More --- >>
By:UMANG Date:25.02.09
Question:Declaring Interface Constants
Post Your View
AnswersIn this interface we are allowed to put a constants in an interface,it would be much easier for programmers to remember names like HIGH_GRAVITY, LOW_BOUNCE, and HIGH_BOUNCE as opposed to knowing the exact int values corresponding to each of those. we have a following code :
public final static int More --- >>
By:UMANG Date:25.02.09
Question:Default Access
Post Your View
AnswersA class which is in the default access no modifiers are preceeding in te decleration.Its mostly imp thing is :
> A class with default access can be seen only by classes within the same package. More --- >>
By:UMANG Date:24.02.09
Question:Final Arguments
Post Your View
AnswersMethod argument are bassiclaly a type of variable declration , which is appear in b/w the paranthesis in the method declration , A typical method declration are following as :
public Record getRecord(int fileNumber, int recordNumber) {}
method argiment is similarilt as a local variables More --- >>
By:UMANG Date:24.02.09
Question:Final Classes
Post Your View
Answersfinal class bassically used when we are wokring n the class declaration .that time we are using the final keyword when we would like to show the " the class can’t be subclassed" .We also can say in diff terms : no other class can ever extend (inherit from) a final class, and any attempts to do so wi More --- >>
By:UMANG Date:24.02.09
Go:
1 2 3
Contact Us
|