This download link is referred from the post: DBATU B-Tech Last 10 Years 2010-2020 Previous Question Papers || Dr. Babasaheb Ambedkar Technological University
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE
Mid Semester Examination - Oct 2019
--- Content provided by FirstRanker.com ---
Course: B. Tech in Information and Technology
Subject Name: Programming in JAVA
Sem: III
Subject Code: BTITE305B
Max Marks: 20
--- Content provided by FirstRanker.com ---
Duration:-1 Hr.
Date:-8/10/2018
Instructions to the Students:
- Assume suitable data wherever necessary.
- All questions are compulsory.
--- Content provided by FirstRanker.com ---
Q. 1 Solve all questions. One mark for each question.
- Which of the following is FALSE about arrays on Java (CO1) Marks 6
- A java array is always an object
- Length of array can be changed after creation of array
- Arrays in Java are always allocated on heap
- None of the above
--- Content provided by FirstRanker.com ---
- What will be the output of following code (CO1)
class Test
{ public static void main (String[] args) { int arr1[] = {1, 2, 3}; int arr2[] = {1, 2, 3}; if (arr1.equals(arr2)) System.out.println("Same"); else System.out.println("Not same"); }
}- Same
- Not same
- Compile time error
- None of the above
--- Content provided by FirstRanker.com ---
- Multiple inheritance means, (CO1)
- one class inheriting from more super classes
- more classes inheriting from one super class
- more classes inheriting from more super classes
- None of the above
- (a) and (b) above.
--- Content provided by FirstRanker.com ---
- Which statement is not true in java language? (CO1)
- A public member of a class can be accessed in all the packages.
- A private member of a class cannot be accessed by the methods of the same class.
- A private member of a class cannot be accessed from its derived class.
- A protected member of a class can be accessed from its derived class.
- None of the above.
--- Content provided by FirstRanker.com ---
- Which of these keywords is used by a class to use an interface defined previously? (CO1)
- import
- Include
- implements
- Implements
--- Content provided by FirstRanker.com ---
- What is true about constructor? (CO1)
- It can contain return type
- It can take any number of parameters
- It can have any non access modifiers
- Constructor cannot throw an exception
--- Content provided by FirstRanker.com ---
--- Content provided by FirstRanker.com ---
Q.2 Solve Any Two of the following. 3X2
- Explain constructor and its properties with example. (CO1)
- Write program to calculate volume of a rectangular block using classes and object with this keyword. (CO2)
- Write a program to calculate sum and average of a n number using multilevel inheritance in java. (CO2)
--- Content provided by FirstRanker.com ---
Q. 3 Solve Any One of the following. 8X
- Write a Java program to convert the integer into binary number. (CO3)
- Write a Java program to calculate the monthly electricity bill for the given range of price per unit consumed. (CO3)
1-100 units - 12 Rs/unit
1-200 units - 14 Rs/unit--- Content provided by FirstRanker.com ---
1-300 units 16 Rs/unit
300 above 18 Rs/unit
(Accept the no. of units consumed by user in integer)
*** End ***
--- Content provided by FirstRanker.com ---
This download link is referred from the post: DBATU B-Tech Last 10 Years 2010-2020 Previous Question Papers || Dr. Babasaheb Ambedkar Technological University
--- Content provided by FirstRanker.com ---