Deck 7: Java Programming Concepts

ملء الشاشة (f)
exit full mode
سؤال
What is byte code in the context of Java?

A)The type of code generated by a Java compiler
B)The type of code generated by a Java Virtual Machine
C)It is another name for a Java source file
D)It is the code written within the instance methods of a class.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
What is garbage collection in the context of Java?

A)The operating system periodically deletes all of the java files available on the system.
B)Any package imported in a program and not used is automatically deleted.
C)When all references to an object are gone, the memory used by the object is automatically reclaim
سؤال
What is different between a Java applet and a Java application?

A)An application can in general be trusted whereas an applet can't.
B)An applet must be executed in a browser environment.
C)An applet is not able to access the files of the computer it runs on
D)All of the above
سؤال
JAR stands for?

A)Java Archive
B)Java Archive Runner
C)Java Application Runner
D)None of the above
سؤال
What are the pillars of OOPS concept?

A)Abstraction, Inheritance, Encapsulation, Polymorphism
B)Atomicity, Inheritance, Encapsulation, Polymorphism
C)Abstraction, Inheritance, Polymorphism
D)None of the Above
سؤال
What is the default buffer size used by any buffered class?

A)128 bytes
B)256 bytes
C)512 bytes
D)1024 bytes
سؤال
Which class cannot be a subclass in java

A)Abstract class
B)Parent class
C)Final class
D)None of above
سؤال
Why we use array as a parameter of main method

A)It is syntax
B)Can store multiple values
C)Both of above
D)None of above
سؤال
What is process of defining two or more methods within same class that have same name but different parameters declaration?

A)Method overloading
B)Method overriding
C)Method hiding
D)None of the mentioned
سؤال
Which of these is correct about passing an argument by call-by-value process?

A)Copy of argument is made into the formal parameter of the subroutine.
B)Reference to original argument is passed to formal parameter of the subroutine.
C)Copy of argument is made into the formal parameter of the subroutine and changes made on parameters of subroutine have effect on original argument.
D)Reference to original argument is passed to formal parameter of the subroutine and changes made on parameters of subroutine have effect on original argument.
سؤال
What is the process of defining a method in terms of itself that is a method that calls itself?

A)Polymorphism
B)Abstraction
C)Encapsulation
D)Recursion
سؤال
Which of the following statements are incorrect?

A)Default constructor is called at the time of declaration of the object if a constructor has not been defined.
B)Constructor can be parameterized.
C)Finalize() method is called when a object goes out of scope and is no longer need
سؤال
What is the stored in the object obj in following lines of code?
Box obj;

A)Memory address of allocated memory of object.
B)NULL
C)Any arbitrary pointer
D)Garbage
سؤال
Which of the following is a valid declaration of an object of class Box?

A)Box obj = new Box();
B)Box obj = new Box;
C)obj = new Box();
D)new Box obj;
سؤال
Which of this statement is incorrect?

A)Every class must contain a main() method.
B)Applets do not require a main() method at all.
C)There can be only one main() method in a program.
D)main() method must be made public.
سؤال
Which of the following statements is correct?

A)Public method is accessible to all other classes in the hierarchy
B)Public method is accessible only to subclasses of its parent class
C)Public method can only be called by object of its class.
D)Public method can be accessed by calling object of the public class.
سؤال
Program which executes applet is known as

A)applet engine
B)virtual machine
C)JVM
D)None of above
سؤال
You read the following statement in a Java program that compiles and executes. submarine.dive(depth); What can you say for sure?

A)Depth must be an int
B)Dive must be a method.
C)Dive must be the name of an instance fie
سؤال
Which is true about an anonymous inner class?

A)It can extend exactly one class and implement exactly one interface.
B)It can extend exactly one class and can implement multiple interfaces.
C)It can implement multiple interfaces regardless of whether it also extends a class.
D)None of above
سؤال
If a thread is to be declared as a daemon thread, it must be declared before

A)start method
B)run method
C)stop method
D)None of above
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/20
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 7: Java Programming Concepts
1
What is byte code in the context of Java?

A)The type of code generated by a Java compiler
B)The type of code generated by a Java Virtual Machine
C)It is another name for a Java source file
D)It is the code written within the instance methods of a class.
The type of code generated by a Java compiler
2
What is garbage collection in the context of Java?

A)The operating system periodically deletes all of the java files available on the system.
B)Any package imported in a program and not used is automatically deleted.
C)When all references to an object are gone, the memory used by the object is automatically reclaim
When all references to an object are gone, the memory used by the object is automatically reclaim
3
What is different between a Java applet and a Java application?

A)An application can in general be trusted whereas an applet can't.
B)An applet must be executed in a browser environment.
C)An applet is not able to access the files of the computer it runs on
D)All of the above
All of the above
4
JAR stands for?

A)Java Archive
B)Java Archive Runner
C)Java Application Runner
D)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
5
What are the pillars of OOPS concept?

A)Abstraction, Inheritance, Encapsulation, Polymorphism
B)Atomicity, Inheritance, Encapsulation, Polymorphism
C)Abstraction, Inheritance, Polymorphism
D)None of the Above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
6
What is the default buffer size used by any buffered class?

A)128 bytes
B)256 bytes
C)512 bytes
D)1024 bytes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which class cannot be a subclass in java

A)Abstract class
B)Parent class
C)Final class
D)None of above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
8
Why we use array as a parameter of main method

A)It is syntax
B)Can store multiple values
C)Both of above
D)None of above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
9
What is process of defining two or more methods within same class that have same name but different parameters declaration?

A)Method overloading
B)Method overriding
C)Method hiding
D)None of the mentioned
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
10
Which of these is correct about passing an argument by call-by-value process?

A)Copy of argument is made into the formal parameter of the subroutine.
B)Reference to original argument is passed to formal parameter of the subroutine.
C)Copy of argument is made into the formal parameter of the subroutine and changes made on parameters of subroutine have effect on original argument.
D)Reference to original argument is passed to formal parameter of the subroutine and changes made on parameters of subroutine have effect on original argument.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
11
What is the process of defining a method in terms of itself that is a method that calls itself?

A)Polymorphism
B)Abstraction
C)Encapsulation
D)Recursion
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
12
Which of the following statements are incorrect?

A)Default constructor is called at the time of declaration of the object if a constructor has not been defined.
B)Constructor can be parameterized.
C)Finalize() method is called when a object goes out of scope and is no longer need
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
13
What is the stored in the object obj in following lines of code?
Box obj;

A)Memory address of allocated memory of object.
B)NULL
C)Any arbitrary pointer
D)Garbage
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which of the following is a valid declaration of an object of class Box?

A)Box obj = new Box();
B)Box obj = new Box;
C)obj = new Box();
D)new Box obj;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
15
Which of this statement is incorrect?

A)Every class must contain a main() method.
B)Applets do not require a main() method at all.
C)There can be only one main() method in a program.
D)main() method must be made public.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
16
Which of the following statements is correct?

A)Public method is accessible to all other classes in the hierarchy
B)Public method is accessible only to subclasses of its parent class
C)Public method can only be called by object of its class.
D)Public method can be accessed by calling object of the public class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
17
Program which executes applet is known as

A)applet engine
B)virtual machine
C)JVM
D)None of above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
18
You read the following statement in a Java program that compiles and executes. submarine.dive(depth); What can you say for sure?

A)Depth must be an int
B)Dive must be a method.
C)Dive must be the name of an instance fie
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which is true about an anonymous inner class?

A)It can extend exactly one class and implement exactly one interface.
B)It can extend exactly one class and can implement multiple interfaces.
C)It can implement multiple interfaces regardless of whether it also extends a class.
D)None of above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
20
If a thread is to be declared as a daemon thread, it must be declared before

A)start method
B)run method
C)stop method
D)None of above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.