Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
40 views
11 pages
Java Ue-2023
Uploaded by
ericcostermboya
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save JAVA UE-2023 (1) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
40 views
11 pages
Java Ue-2023
Uploaded by
ericcostermboya
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save JAVA UE-2023 (1) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 11
Search
Fullscreen
nding item in Column B- (i Mar! with its corresPo wo jn Column A Each) 4 a8 rit - obec Fat, double, Float identify and Giscard objee' int, | ea Tonger needed PY S a abet ulation ii, The method must have ie ye a eS rer at least that Of Ee _ Inheritane act ‘lass, and return type, | F- Collection of abstract class name and identical parameter G. Class list. H. Double, Integer, Character \ i. Bae or we 1. Object \ iv. It is always invoked when @ i \ new abject is created: J, Garbage collection \ v. The base class of a oo ; exception. \L. Overriding \ vi. Prevent anyone ‘from M. Enhanced for loop \ |. instantiating the class directly. | N- ArrayList class vit Cannot be extended ©, Error \ iii. ~The i . Wes \ ae a allows print() | P- Specialization \ i () methods to /Q. Instance of class \ invoke foString() method R. RuntimeExcepti " automatically. ls Exception \ ix, Blueprint or template . Late binding | Some of an|T. Polymorphism | x. Private m : \ embers, U. Collectio mee”: SS a | Ww. Constructor X. InterfaceQQ eT aration ArrayList list = new ArrayList(); 2 ix. What is known by the dec! Aclist is an ArrayList object. B. Elements of the list array are objects. C. The type of information stored by list is unknown. D. The number of array elements is not specified. E. All of the above x Which statement about interfaces is true? 1. An interface contains only public abstract methods and public static final fields. Ifa class implements an interface and then fails to implement IL any methods in that interface, then the class must be declared abstract. Mi. While a class may implement just one interface, it may extend more than one class A. Tonly B.1 and II only C.Tand ITI only D. Il and III only E, LU, and IClass What type of relationship exists between myMethod i iv 9 Animal and myMethod in class Dog? cle Animal ( oe ublic void myMethod By anecicde gare In ("from class An Diz } } class Dog extends Animal { ; public void myMethod( String x ) System.out.printIn ("from class Dog: } / D. Method hiding A. Method overloading B. Method binding E. Method Overriding ; C. Method copying ¥. Which of the following statement describes dy! "xy; namic resizing as is applies to the ArrayList class? Av The size of a new ArrayList object must be specified at instantiation. B. The size of an ArrayList object can be iterated throughout a Program. C. The size of an ArrayList object is fixed at instantiation. D.The object changes size dynamically as new elements are added. E. Both A andB vi. Assume you have three classes: Person, Teacher, and Student. Teacher and Student are both subclasses of Person. The PersonQuestion One Read eae! iii. (0 MARKS) SECTION A: ¢ most correct respons and choose th (1 Marks Each) fh question carefully declared ina class is called 5 D. Object variables The static variable E, Global variables A. Local Variables B. Class variables C. Instance variables Which of the following characteristics of an object-oriented programming language restricts behaviour so that an object can perform actions that are defined for its class? D. Encapsulation only FE. Abstraction A. Dynamic Binding B. Polymorphism C. Inheritance Which command lines will compile and run java class called echo respectively? A. javac echo and java echo,java B.javac echo.java and java echo C. java echo.class and javac echo D. java echo and javac echo.java E. javac echo. java and java echo.classQuestion Three 2 2 Mark (@) Why main method is declared static” @ Marks) (0) Briefly explain how add(index, values) affect the performance of 1 2 Ma Jaya collection? (@ Marks) (©) Carefully read the following program and use it to answer questions that follow: -comments indicate where missing components of the program are to be placed. (2 Marks Each) public class MyMain { publie static yoid main(String { Jargs)( //(2)print the greeting //(3) construct a MyClass object called myObject //(4) update() } } class MyClass( “4/ (1) definition of M; i yClass_ construct Public static void greetings () { a h // definition of g: Public void update (in /f definition o } Public void pr. 0 4 definition ng title) { AINSTRUCTIONS TO CANDIDATES i. This examination paper consists of TWO (2) -Sectio SEVEN (7) questions in FIFTEEN (15) printed pages, ii, Answer all questions in Sections A and THREE (3) questions in Section B, iii. The total score for this examination is 100 points, Marks are allocated at the end of each question. iv. ALL responses should be written in the answer book provided Insert the examination Paper into the answer book after the examination. Students should not take any examination paper(s) Out of the examination room, All regulations guiding the administrati on of university ¢xaminations apply,application to ote can invoke jects. Class Invoice ation for only one bles partNumber, partDeser ntains @ constructor, | Invoice obj «ce that contains billing inform: kind of part. The class declares private instance varial quantity and pricePerltem. Class Invoice also col methods and a toString method that returns 2 String representation of an 7 object. The class Employee contains employee’s firstName, fami id . Si: an : lo It also contains a constructor for ‘on of instance variable and a toString method for returning its string representation. Salaried : employee is paid a fixed 7a weekly sali »gardless of the number of hours worked. Thereft . a: class should contain a uni i fore, SalariedEmployee ique variable called salary, a constructor, a
You might also like
Topic: Evolution of Java, Java Architecture, Language Basics, Flow Control
PDF
25% (4)
Topic: Evolution of Java, Java Architecture, Language Basics, Flow Control
15 pages
2nd-cs
PDF
No ratings yet
2nd-cs
31 pages
Final Java 2023
PDF
No ratings yet
Final Java 2023
11 pages
E 0883 Test
PDF
No ratings yet
E 0883 Test
10 pages
Final_246
PDF
No ratings yet
Final_246
21 pages
Combined Solution
PDF
No ratings yet
Combined Solution
12 pages
OPPE REvision 1
PDF
No ratings yet
OPPE REvision 1
22 pages
نموذج اجابة البرمجة الشيئية ثانية حاسبات
PDF
No ratings yet
نموذج اجابة البرمجة الشيئية ثانية حاسبات
8 pages
Sem 1 Practice Final 2-2016
PDF
No ratings yet
Sem 1 Practice Final 2-2016
16 pages
1912099_CS212
PDF
No ratings yet
1912099_CS212
16 pages
Advanced Programming Exam 1
PDF
No ratings yet
Advanced Programming Exam 1
5 pages
Java 50 Questions
PDF
0% (1)
Java 50 Questions
14 pages
Mts Oop Fall2016-Sub Sol It-Sameena
PDF
No ratings yet
Mts Oop Fall2016-Sub Sol It-Sameena
6 pages
Advance Java
PDF
No ratings yet
Advance Java
59 pages
Common Errors To Avoid: Review Questions and Exercises
PDF
No ratings yet
Common Errors To Avoid: Review Questions and Exercises
5 pages
OOP2025_JavaExercises_Lab9_OOPAndCollectionsFramework
PDF
No ratings yet
OOP2025_JavaExercises_Lab9_OOPAndCollectionsFramework
21 pages
CSC1016S 2019 Exam Final
PDF
No ratings yet
CSC1016S 2019 Exam Final
25 pages
comp301_f24_m1_practice_solution
PDF
No ratings yet
comp301_f24_m1_practice_solution
12 pages
Java Sol
PDF
No ratings yet
Java Sol
18 pages
Practice Worksheet 5
PDF
No ratings yet
Practice Worksheet 5
6 pages
Icse 10 2024
PDF
No ratings yet
Icse 10 2024
4 pages
Page 1 of 17
PDF
No ratings yet
Page 1 of 17
17 pages
Lecture 4 OOP(OOP in Java)
PDF
No ratings yet
Lecture 4 OOP(OOP in Java)
39 pages
Comprog 2 Q5andQ6
PDF
No ratings yet
Comprog 2 Q5andQ6
10 pages
CP2 MidExam
PDF
No ratings yet
CP2 MidExam
5 pages
Lecture 4
PDF
No ratings yet
Lecture 4
33 pages
AP Flash - Cards - DOVI PDF
PDF
No ratings yet
AP Flash - Cards - DOVI PDF
15 pages
Term1 Java Exam 2024_2025 Marking Guide
PDF
No ratings yet
Term1 Java Exam 2024_2025 Marking Guide
16 pages
Java Ii
PDF
No ratings yet
Java Ii
19 pages
OOP1_Unit 4 (Amiraj) VisionPapers.in
PDF
No ratings yet
OOP1_Unit 4 (Amiraj) VisionPapers.in
46 pages
Lecture 07 08 String Inheritance Relations
PDF
No ratings yet
Lecture 07 08 String Inheritance Relations
16 pages
Java As An Object-Oriented Programming Language: 04. Inheritance
PDF
No ratings yet
Java As An Object-Oriented Programming Language: 04. Inheritance
72 pages
Java CheatSheet
PDF
No ratings yet
Java CheatSheet
5 pages
Part I. Multiple Choice Questions (3 Points Each)
PDF
No ratings yet
Part I. Multiple Choice Questions (3 Points Each)
26 pages
OOP Final 2
PDF
No ratings yet
OOP Final 2
8 pages
Chapter 4-JAVA-OOP-Prog
PDF
No ratings yet
Chapter 4-JAVA-OOP-Prog
23 pages
Chapter06 Accessible (1)
PDF
No ratings yet
Chapter06 Accessible (1)
60 pages
Oops Key
PDF
No ratings yet
Oops Key
10 pages
Module For CSE & EEE
PDF
No ratings yet
Module For CSE & EEE
51 pages
CC103 Lesson
PDF
No ratings yet
CC103 Lesson
102 pages
programming in java
PDF
No ratings yet
programming in java
54 pages
Java Notes Language
PDF
No ratings yet
Java Notes Language
21 pages
Review Quiz_ Attempt Review Cs1102
PDF
No ratings yet
Review Quiz_ Attempt Review Cs1102
32 pages
Java MCQ
PDF
No ratings yet
Java MCQ
45 pages
Exam 1: Test Taking Instructions. No Calculators, Laptops or Other Assisting Devices Are Allowed. Write
PDF
No ratings yet
Exam 1: Test Taking Instructions. No Calculators, Laptops or Other Assisting Devices Are Allowed. Write
8 pages
Microprocessor Full Standard Notes
PDF
No ratings yet
Microprocessor Full Standard Notes
60 pages
IOOM-Endsem-2023
PDF
No ratings yet
IOOM-Endsem-2023
4 pages
Solutions Exam Questions Set 1 CSC2106 Object-Oriented Design & Programming
PDF
No ratings yet
Solutions Exam Questions Set 1 CSC2106 Object-Oriented Design & Programming
13 pages
Class 10 Key
PDF
No ratings yet
Class 10 Key
5 pages
Se2 Group9 9
PDF
No ratings yet
Se2 Group9 9
75 pages
java notes
PDF
No ratings yet
java notes
60 pages
Final
PDF
No ratings yet
Final
12 pages
Private Int Numants 0 Numants++
PDF
No ratings yet
Private Int Numants 0 Numants++
5 pages
Jnotes
PDF
No ratings yet
Jnotes
28 pages
Java Lab Student Manual (AR20)
PDF
No ratings yet
Java Lab Student Manual (AR20)
26 pages
OOP - 5 Units Important Questions (1)
PDF
No ratings yet
OOP - 5 Units Important Questions (1)
15 pages
Java Class and Objects
PDF
No ratings yet
Java Class and Objects
34 pages
CD 326 Assignment Group IV SE FINAL VERSION
PDF
No ratings yet
CD 326 Assignment Group IV SE FINAL VERSION
13 pages
Lecture 2
PDF
No ratings yet
Lecture 2
14 pages
4 Aa
PDF
No ratings yet
4 Aa
55 pages
CP 323Lecture 4
PDF
No ratings yet
CP 323Lecture 4
12 pages
2 Aa
PDF
No ratings yet
2 Aa
42 pages
Zuuh's Group Work
PDF
No ratings yet
Zuuh's Group Work
11 pages
Group Assignment 1
PDF
No ratings yet
Group Assignment 1
2 pages