Go:
1 2 3 4 R4R --->Java --->> SCJP1.5 Chapter05 --> Sun Java Certification
Page 1
Question:Array
Post Your View
AnswersIn the java language Array is bassically a objects , Which object mainly use for the store the variables , who are the same tyoe of variables . Array alos be a object on the heap , its can only handle premitive elements, amso handle to the object references.for the array we must know three things th More --- >>
By:UMANG Date:21.02.09
Question:Array Instance Variables
Post Your View
AnswersWe know that Array is a type of object. its also declared but not explicitly initialised for the value of Null.just as other object reference instance variable.HEre most imp line is " Array elements are always always always given default values, regardless of where the array itself is declared or in More --- >>
By:UMANG Date:24.02.09
Question:Array Reference Assignments for Multidimensional Arrays
Post Your View
AnswersWhen we assingen an array to a array reference which is already prevoious declared in the index , The array we were assigning must be a sam edirection as the refrence we were assign it to .
Example : 2-dimensional array of int arrays cannot be assigned to a regular int array reference whihc is show More --- >>
By:UMANG Date:21.02.09
Question:Array Reference Assignments for One-Dimensional Arrays
Post Your View
AnswersIn the one dimensional array we assigns to the array references to recognise legal and illegal assignments for array reference variables.Here Its refrences to a array objects. For the example : if we declare to the int array , in the reference variable we declred can we reassined to any int array, b More --- >>
By:UMANG Date:21.02.09
Question:Arrays of Object References
Post Your View
Answersif we are declare array type in a class the we can put that all ojects in the any sub class of the declred type in t the array .for the example Honda is the sub class of the Car,we can put the both Honda object and car object in to the array as follows :
class Animal {}
class Cat extends Animal { More --- >>
By:UMANG Date:21.02.09
Question:Arrays of Primitives
Post Your View
AnswersArray type primitives is bassiclaly which array who accept any value , which can be promoted implicitly to the declare type of the array .that have tha many rules of the promotions .int array can hold any value which is fit for the 32-bit int variable. and also its the code is legal .that are follow More --- >>
By:UMANG Date:21.02.09
Question:Boolean Literals
Post Your View
AnswersBoolean literals are the bssically a similar as source code , its mainly use for the representation for boolean values . and we also know as the boolean values are only signifies the true and false . its happn only in java language but in other language its not happening as such . java language is t More --- >>
By:UMANG Date:21.02.09
Question:Character Literals
Post Your View
AnswersCharector litrals is bassically use for the represent only the single charector for a single quotes.
char a = 'a';
char b = '@';
in the charector literalas have a many facilities in the source code .We can also use to the unicode with charctor literals . but we must be mentioned the u More --- >>
By:UMANG Date:21.02.09
Question:Class, Method, and Variable Modifiers
Post Your View
AnswersThere are many modifiers are there , that's also are class , method and variable modifiers . which is following as :
> Abstract : It is used for declaration a class that cannot be instantiated.
> A Method : It should be implemented by a nonabstract subclass.
> Class : this keyword using for spec More --- >>
By:UMANG Date:20.02.09
Question:Command-Line Arguments to Main
Post Your View
AnswersCommand Line Argument is woking similar as all other arrays. The main method is called firstly one the JVM invokes , it must be take a String array parameter.
class TestMain {
public static void main (String [] args) {
System.out.println("First arg is " + args[0]);
}
}
When we invoked command More --- >>
By:UMANG Date:24.02.09
Question:Constructing an Array
Post Your View
AnswersConstruct an array is bassically means the create if an array object , Which object create in the heap. We can also say like thet "doing a new on the array type".When we construct the array we must mentioned the size of the array becouse java would like to know how much space to allocate on the heap More --- >>
By:UMANG Date:21.02.09
Question:Constructing and Initializing an Anonymous Array
Post Your View
AnswersIts the second short cut for the array specific syntax, thats called as anonymous array creation. its used to construct ans initialising an anonymous array .Its use for the assining to the array , which is already declared in the refence variable.
int[] testScores;
testScores = new int[] { More --- >>
By:UMANG Date:21.02.09
Go:
1 2 3 4
Contact Us
|