0% found this document useful (0 votes)
128 views69 pages

RTMCQ and OCT 3rd Merged

The document contains a series of questions and answers related to computer science topics like algorithms, data structures, databases, operating systems and programming languages. Some key points: - Questions cover selection sort, merge sort, SQL, asymptotic notation, conditional statements, UNIX commands, algorithms analysis, data types, file systems, and more. - Answers identify non-adaptive sorting algorithms, SQL substr functions, ways to analyze algorithm efficiency, conditional flow control, UNIX shutdown commands, and other technical details. - Later questions involve relational databases, constraints, identifiers, software development models, and Java/JavaScript coding examples and output.

Uploaded by

Riyaz Ratna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views69 pages

RTMCQ and OCT 3rd Merged

The document contains a series of questions and answers related to computer science topics like algorithms, data structures, databases, operating systems and programming languages. Some key points: - Questions cover selection sort, merge sort, SQL, asymptotic notation, conditional statements, UNIX commands, algorithms analysis, data types, file systems, and more. - Answers identify non-adaptive sorting algorithms, SQL substr functions, ways to analyze algorithm efficiency, conditional flow control, UNIX shutdown commands, and other technical details. - Later questions involve relational databases, constraints, identifiers, software development models, and Java/JavaScript coding examples and output.

Uploaded by

Riyaz Ratna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

1.

Which of the following is said to be non-adaptive


ANS=selection sort
Merge sort

2. What is the output of the query:


startprogram
Select substr(“Stay home!Stay safe!!”,1) from dual;
End program
ANS= Stay home! Stay safe!

3. Which of the given options are used to calculate the running time complexity of
an algorithm
ANS= Asymtotic notation

4. is used to alter the program flow, when a set of


statements need to be excecuted only if a condition is fulfilled
ANS= Conditional statement

5. Name of the unix command to perform safe shut down a unix system
ANS= Shutdown

6. Analysis of selection algorithm eliminates number of elements each


time
Ans= n/2

7. White box testers should require the working knowledge of the code segment
ANS-True
8. A doubly linked list cannot be implemented using a single pointer variable in
every node
Ans= false

9. Kernel of unix operating system is written using


Ans = C

10.Below statements is an example of path in unix.


$cd/home/course/CSE/C++
Ans = Absolute

11.Path is used to locate file in unix files system. The types of path supported are
&
Ans = Absolute
Relative

12.Which command in UNIX is used for clearing the screen?


Ans = clear

13.Unix file system is a collection of files and directories organized in a


structure.
Ans = hierarchical

14. If you create a view WITH READ ONLY option, it can only be viewed and not
updated. State true/false.
Ans = true.

15.From the below list which files will be listed using the following command?
Ls chap[^1-4]
Ans a) chap6
b) chap7

16. constraints ensures and of the data in the database


Ans = a)Correctness
b) Reliability

17.The WHERE clause cannot be used to apply additional conditions in SELECT


statement containing the ON or the USING clause. State true/false.
Ans = true(not sure).

18.Consider the following array {12,3,1,5,8} Tell us the number of steps that are
required to sort the elements in the ascending order using insertion sort.
Ans = 4

19.Choose legal identifiers from the below options:


a)4thvariable
b)_98_
c) &count
d)$says
e)new

20. In which of the given data structures, does the implementation becomes
difficult?
Ans= graph

21.Which element is used to indicate that elements defined in the xsd must appear
in the same order in the xml file.
Ans = <xs.sequence>

22.Which of the following are valid variables declaration in java script?


a)VARIABLE empid=44;
b) DECLARE empid=900;
c) var empId=10;
d) VAR empId=90;
ans = c
23.Sita wishes to greet the user when the user clicks on “Greet me” button in
which event does she need to write the javascript code for greeting the user?
Ans = onclick

24.William is planning to develop software- Customer Feedback System, which


helps the department store to predict the sales target. His requirements are
clear but his requirements are not stable. Suggest a software development
suitable for this scenario.
Ans = Prototype model

25.Name the Unix command to perform safe shut down a unix system
Ans = shutdown.

26.White box testers should require the working knowledge of the code being
tested
Ans= true

27.Which attribute of schema element is used to identify the default namespace


Ans = xmlns

28. import java.util.ArrayList;


import java.util.List;
class TestMain{
public static void main(String[] args){
//INSERT LIST DECLARATION HERE
for(int i=0;i<=5;i++){
List<Integer> row=new ArrayList<Integer>();
for(int j=0;j<=5;j++)
row.add(i*j);
db.add(row);
}
for(List<Integer>row:db)
System.out.println(row);
}
}
Ans = List<List<Integer>>db= new ArrayList<List<List<Integer>>();

29. public class Main


{
public void printVal(Integer i)
{
System.out.println("Integer "+i);
} public void printVal(int i)
{
System.out.println("Int "+i);
}
public static void main(String[] args) { new Main().printVal(127); }
}
Ans = int 127

30. public class TestMain extends Tree


{
public static void main(String s[])
{
new TestMain().go();
}
void go(){
grow2(new Tree().new TestMain());
grow2(Main)new tree().nw TestMain());
}
void grow (Tree t1,main r1){
Testmain r2=(Testmain)t1;
Tree t2=(Tree)r1;
}
}
class Tree{}
ans = compile time error

31. public class Main{


public static void main (String[] args){
String a[]=new String[-9/-4];
int b=a.length;
System.out.print(new
String[]{"Harley","Aprilla","Kawasaki","Triumph","Guzz"}[0]);
}}
Ans = Kawasaki

32. predict output


class TestMain{
int x=50;
public static void main (String[] args) {
final TestMain f1= new TestMain();
TestMain f2 = new TestMain();
TestMain f3 = isvalid(f1,f2);
System.out.println(f1==f3)+""+(f1.x==f3.x));
}
static TestMain isvalid(TestMain x,TestMain y){
final TestMain z=x;
z.x=60;
return z;
}
ans= true true

33. class mammel{


String name= "Dog";
String makenoise(){
return "Bow Wow";
}
}
class Cat extends mammel{
String name="Cat";
String makeNoise()
{
return "Meow";
}
}
public class Main{
public static void main (String[] args) {
new Main.go();
}
void go()
{
mammel m=new Cat();
System.out.println(m.name+m.makeNoise());
}
}
Ans = dog meow

34. Bonus calculated module was unit tested by the developer. Depending on the
salary the bonus
needs to be calculated. Assume if one of the salary-range is between 30000 to
40000 then the
bonus should be 10%. From the given options identify the test cases for
Equivalence Partitioning.
Ans-
25000,35000,45000
25000,27000,29000
42000,43000,45000
32000,35000,39000

35. What will be the code to create a text box which accepts only 4 digit numbers
Ans = <input type=”text” name=”pin” pattern=”*0-9+,4-”>

36.Which script code produces the output as Welcome to “Javascript”


Ans-
<script>var x="welcome to \"Javascript\"“; alert(x);</script>
<script>var x="welcome to "Javascript"“; alert(x);</script>
<script>var x="welcome to \"Javascript\"“; x. alert(x);</script>
<script>var x1="welcome to \"Javascript\"“; alert(x);</script>

37. What is the command to concatenate fname and lname with a space in between
and display
the output under the heading of “Full Name”?
Employee(eid,fname,lname,salary)
Ans= select fname||’ ’||lname as ‘Full Name’ from employee;
select fname||’ ‘||lname ‘Full Name’ from employee;

38. Consider the following table structure and write a query to display all the
employees who
have and don’t have department id assigned
Emp(fname,lname,dno)
Dept(dep9d,dname)
Ans= 1) SELECT FNAME,DEPTID,DNAME FROM EMP E LEFT OUTER JOIN DEPT D
ON (E.DNO=D.DEPTID);
2) SELECT FNAME,DEPTID,DNAME FROM EMP E FULL OUTER JON DEPT D
ON(E.DNO=D.DEPTID

39.Which of the following pair is equivalent to one another


Startprogram
Startprogram
-,minus()

Startprogram
||,or
Startprogram
<>,!=
Startprogram
!= and NOT IN

40.Select statements true about persistence


Answer = i) persistence is way through which life time of object exists even after
the terminates
ii) Java uses serialsation for object persistence
iii) Persistence is a way through which the life time of object is
terminated as the program terminates
iv) Persistence of object is done by java runtime automatically.

50. public class TestMain


{
{
index=1;
}
int index;
public static void main(String[] args)
{
new TestMain().find();
}
void find(){
int[][]d = {{7,8,9},{4,5,6},{0,1,2,3}};
System.out.println(d[index++][index++]);
}
}
Ans = 6
41. class Rays {
static String s="";
protected Rays(){
s+="Rays";
}
}
class Alpha extends Rays {
private Alpha(){
s+=" Alpha";
}}
public class Main extends Rays
{
private Main() {
s += "SubAlpha";
}
public static void main(String s[])
{ new Main();
System.out.println(s);
}}
Ans = rayssubalpha

42. In order to refer to all the elements in a one dimensional array which is the
possible option that you would choose.
Ans = Using an indexed loop, such that the respective from 0 to the array
size minus one.
43 is the time duration for each sprint
a>2-3 days
b>2-5 hours
c>2-4 weeks
d>1 month

43. Match the correct options with the characteristics of a good program

1) Cost effectiveness - A)Ability to handle most of the changes without


having to rewrite the entire program

2)Eficiency - B)Deals with the amount of time and memory


space required for a program

3)Portability - C)Ability to run on different platforms with or


without minimal changes

4) Flexibility – D)Deals with program quality without much


expenses
Ans = 1-D,2-B,3-C,4-A

44. Match the function name with the corresponding description


1)NVL 2)NVL2 3)COALESCE 5)NULLIF
WITH
A)Converts null to an actual value B)if the first expression is not null, the second
expression is returned and if the first expression is null, the third expression is
returned C)Returns the first not null expression present in the expression list
D)Compares two expressions and returns nut if they are equal

Ans = 1-A, 2-B, 3-C, 4-D

45. Which of the following tags are new in HTML5?


Tag 1: <canvas> Tag 2: <footer>
Tag 3: <caption>
Choose one
a>tag 1 and tag 2 only
b>tag2 and tag3 only
c>tag 1 and tag3 only
d>tag 1 , tag2 and tag3 only

46. Which of the following options are false with respect to trees?
Choose the best option

A) tree which does not have any node other than the root node has depth of zero
b)A tree which does not have any node other than root node is called a null tree
C)A tree with n nodes has exactly n branches or degree
D)All the options

48. Which of the following can be the parent tag for<figcaption> element?
Tag 1: <figure>
Tag 2: <footer>
Tag 3: <caption>
Ans = Tag 1 only

49. public class Main


{
{
System.out.print("Hello");
}
public display()
{
System.out.print("display");
}
public static void main(String s[])
{
System.out.print("hai");
display dobj1=new display();
display dobj1=new display();
}
}
Ans = haiHellodisplayHellodisplay

49. which is not a jquery method.


Text()
Html()
Val()<br>
Body()

50. which is the command to display all login names and the number of user
logged in

Who -u
Who -q
Who -H
Who -m

51. is used to alter the program flow, when a set of statements need
to be executed only if a condition is fulfilled.

Ans= conditional statements

52. in which of the given data structures, is pointers concept applied?


Linked list
Binary tree

53. What is the output of the query: startprogram


Select substr(“Stay home! Stay safe!!”,1)from dual;
End program
Ans: Stay home! Stay safe!

54. appending content to existing file in vi editor can be done in mode.

Command mode
Insert mode
Append mode
Escape mode

55. What string datatype can be used for a string that does not contain line
feeds,carriage return or tabs.

a . xs:string
b. xs:name
c. xs:nospace
d. normalized string.

56. which schema is used to identify the default namespace


1.target Name space
2. xmlns
3. elementFormDefault
4.version

57. which is the root element of every XSD


a. schema
b. root
c. schema-root
d. base

58. choose the data control Language commands?


Commit
Grant
59. In HTML, base tag should be used inside the head section only?
True

60. which uml diagram is capable to depict conditional branching and loop
execution?
Ans = sequence diagram

70. choose the methods(s) of the stringbuilder class


Intern()
Delete()
Append()
Reverse()
Replace()

71. Consider the following structure


Customer (custid,custnmae,address,city,country)
Choose the option display all customer who all are not from Hyderabad and
delhi.

a. Select * from customer where city in(“Hyderabad”,”Delhi”);


b. Select * from customer where city < > in(“Hyderabad”,”Delhi”);
c. Select * from customer where city not in(“Hyderabad”,”Delhi”);
d. Select * from customer where city <>“Hyderabad” and city <>”Delhi”;

78. which of the given options are true with respect to linked lists, when
compared to arrays
1.Linked lists are dynamic in size
2.Random access is possible in linked list
3.Insertion and deletions are expensive in linked list
4.All the options

79. “How to do” aspects is converted in a SRS document.State true/False.


Ans:0(False)
80. consider a scenario: you have written a code to display a menu on the screen
and some operations are performed based on the given user input.
Which control structure would you use ,so that the menu is guaranteed to
show?display at least once on the screen, before performing the operation
Ans= do-while loop

81. US Insurance project development team members are divided into two
groups, one team
works in the development office in India and the other group works onsite, ie,
at the client location
So Programmers located in different locations is not suitable for methodologies
Ans=DSDM

82. Which of the following is not a part of SRS document


Ans –
Functional Requirement
Non-Functional Requirements
Implementation Details
Hardware Software specifications

83. ) When constructing loop statements,if the iteration condition is not


terminated ,it will
result in Infinite loop(true?false)
ans= true

84) Sam and rose are working on the loan monitoring project the head version
was checked
out By both sam and rose .both of them made their changes in the local
machines both of them
Made the required changes and updated the same to the server from the given
options Identify
correct option
Ans= Second projects gets over written by the first one

85) ERD Example


consider the given scenario. A product may or may not have a sale.
A sale can have one or more products.Iden9fy the op9onality between the
product and sales
correct option: 1…0

86. In a binary search algorithm, if the element to be searched is lesses than the
pivot value (middle value), then is split in half.

Right interval
Left interval
Half interval
Complier dependent

87. startprogram
public interface studentmark{
/*insert code here*/ int mark=100;
}
which modifiers when inserted in the above code will provide compilation
errors?(choose two)
endprogram

final
static
abstract
private
public

88. )Amaze Agencies, Customers can apply for loan. To apply loan the
customers
should get registered first then apply for the loan. The admin will approve the
loan
and then the loan will be issued to the customer.
Identify the classes in above scenario.
Ans: Customer, Loan, Register.
90. class High{
public High(String s){
System.out.print("From High");
}
}
public class Main extends High{
public Main(String s){
System.out.print("From Low");
}
public static void main(String[] args){
new Main("High Low");
System.out.prinln("");
}
}
Ans = compile time error

91. The following XML fragment is legal.


Startprogram<2020SalesReport>
<income>1000000</income>
<profit>500000</profit>
</2020SalesReport>
Endprogram
Ans: True

92. 1)INNER JOIN 2)LEFT OUTERJOIN 4)RIGHT OUTER JOIN 5)FULL OUTER JOIN
WITH
A)Returns records that have matching values in both tables B)Returns the matched records
from the
right table, and all records from the left table C)Returns the matched records from the left
table, and
all records from the right table D)Returns all records when there is a match in either left or
right
table
a>1-d,2-c,3-b,4-a
b>1-d,2-b,3-c,4-1
c>1-d,2-b,3-a,4-c
d>1-a,2-b,3-c,4-d
93. Consider the file staff dat which has the following content
1:Anu Professor 85000 y
2 Sam Associate Professor 150000 5yrs
3. John Professor 75000 6yrs
4. Suresh Associate Professor 150000 5yrs Which is the command to display the outbus as
tolos?
Suresh Associate Professor
Sam Associate Professor
John Professor
Anu Professor
Ans= cut -d: -f 2,3 staff dat|sort -r

94. The company needs to change the job title ‘officer’ to ‘Administrative officer’ for all
officers.which statement does this
Ans= update employee job=’Administrative officer’ where upper=’officer’;

95. identify the type of control statement from the given option, in which the program chooses
two or more alternative path based on the result of a particular expression that returns a
Boolean value.
Ans=sequential

96. public class demo


{
static int num1=85; Note=
Agar question mai num1 or num2 ki
int num2=58; values alag aegi to fatafat is copy kar k compiler m
{ check kar k output bata dena..jaha jaha demo hai
display(); waha Main likh dena agar online compiler use karre
ho to
num1=58;
num2=85;
}
void display()
{
System.out.println("num1="+num1);
System.out.println("num2="+num2);
}
public static void main(String d[])
{
demo myobj=new demo();
myobj.display();
}}
Ans =
num1=85
num2=58
num1=58
num2=85

97. predict the output display the loan type and the number of customers under
each loan type,considering only those loan types which are taken by more than
one customer.
Select loan_type,count(customer-id) from loans_taken l1 inner join loans l2 on l1
loan_id=l2 loan_id group by loan_type having count(customer_id)>1 order by
loan_type

98. Consider the following css code snippet

Startprogram
H1{
Text-shadow : 2px 3px 5px;
}
Endprogram

Choose the appropriate appearance for the text……….


Ans= horizontal shadow 2px,vertical shadow 3px,blur 5px

99. which of the below are functional interfaces?

Clonable
Serialization
Autocloseable
Comparable
Comparator

100.
Statement 1 : an include relationship between usecase means the included usecase
will be called every time the base usecase is executed

Statement 2 : an extends relationship between usecase means the extended usecase


is executed only when a given condition is true

Identify the correct statement

Ans= both 1 and 2 are true

101 what is the order of execution when there is a parent class and a child class
with constructors in it?
Ans =
1. initialization block of super class
2. initialization block of the class
3. constructor of super class
4. constructor of the class

102. Spot the error. Observe the given algorithm to calculate the simple interest.
Identify the

incorrect step (if any)


Step 1: Start
Step2: Get priniciple_amount,no_of years,rate_of_interst
Step3: Multiply priniciple_amount,no_of years,rate_of_interst and store it in
result
Step4: Simple_Interest=result%100
Step5: Display Simple Interest
Step6: Stop

Ans = Step 4

103. class Television


{
public void getPictureResolution(){
System.out.println("Video Quality is low");
}}
public class smartTv extends Television{

public void getPictureResolution(){


System.out.println("Video Quality is high");
}

public static void main(String[] args) {


try{
((smartTv)new Television()).gePictureResoution();
}
catch(ClassCastException e)
{System.out.print("Class cast exception was caught");
}
finally{
System.out.println("Finally");
}
}
}

Ans=
video quality is high
finally

104.
You need to analyze the time duration from the time that your orders are placed
to the time that your orders are shipped.
To do this, you must create a report that displays the customer number, date
ordered, date shipped, and the number of
months in whole numbers from the time the order is placed to the time the order
is shipped Which statement produces the required results

options =
O SELECT customer_id, order_date, shipping_date, ROUND(DAYS BETWEEN
(shipping_dale, order_date)) 30) Time Taken FROM order,

O SELECT customer_id, order_date, shipping_date,ROUNDOFF(shipping_date


order_date) Time Taken FROM order

O SELECT customer_id, order_date, shipping_date,MONTHS BETWEEN


(shipping_da order_date) Time TakenFROM order,

O SELECT customer_id, order_date, shipping_date ROUND(MONTHS BETWEEN


(shipping_date, ter_date)) Time Taken FROM order,

105. in CSS, which of the following code/ codes can be used for colouring a
table background in red?
Code 1: table {background-color: red; }
Code 2: table {bgcolor: red;}
Code 3: table {background: red;}

Choose one
Ans= code 1 only

106. class TestMain{


public static void main (String[] args) {
Map<Tasks, String> m= new HashMap<Tasks, String>();
Tasks t1 = new Tasks("Jan");
Tasks t2 = new Tasks("Jan");
Tasks t3 = new Tasks("Apr");
m.put(t1,"Design");
m.put(t2,"Code");
m.put(t3,"Develop");
System.out.println(m.size());
}
}
class Tasks{
String day;
Tasks(String d){
day=d;
}
public boolean equals(Object o){
return((Tasks)o).day==this.day;
}
}
public int hashcode()
{
return 0;
}
Correct option: 3

107. Agile methodology accepts change of requirement at any stage. State true or
false
Ans = 1

108. A linear structure which follows a specific order in which the operations are
performed.Stack follows which of the given orders?
Ans = last-in-first-out

109. when an exception occours in a method.The method creates an object for that
exception. To handel the exception, it is given to the run time system.the run time
system searches for all the methods in the call stack,it is cannot find the
approproate handler then it hands over the object to?
Ans= nosuchmethodexception

110. class BlackBoard{


Short story=200;
BlackBoard write(BlackBoard bb)
{
bb=null;
return bb;
}
public static void main(String[] args)
{
BlackBoard b1=new BlackBoard();
BlackBoard b2=new BlackBoard();
BlackBoard b3=b1.write(b2);
b1=null;
}
}

Ans= 1

111. Which of the following is a checked exception


Correct answer: IOException
FileNotFoundException

112. import java.util.*;


public class Main
{
public static void main(String[] args)
{
String[] str={"Banana","Apple","Watermelon","Mango"};
sortFruit o=new sortFruit();
Arrays.sort(str,o);
for(String s: str)
System.out.print(s+" ");
System.out.println(Arrays.binarySearch(str,"map"));
}
static class sortFruit implements Comparator<String>
{
public int compare(String str1,String str2)
{
return str2.compareTo(str1);
}
}
}

Ans = Watermelon Mango Banana Apple -5

113. What is the relationship between these two Building has rooms
Ans
Composition
Aggregation
Generalization
Hierarchy

114. which of the following tag represents a section of the document intended for
navigation in html5?
Ans= nav

115. A Software needs to be developed for a Sterlin Hospital to monitor the radiations given
for cancer patients. Even a very minute
deviation would result in the risk of the life of the patient. Which would be the appropriate life
cycle model used to implement
the given scenario
Select one:
a. Agile
b. Prototyping
c. Water fall
d. Spiral

116. which of the following operations can be used instead of the or operator
when there are multiple values that need to be compared
Ans = IN

117. Consider the scenario. For an insurance, a customer makes a claim. The claim
can be a
normal or a critical claim. The insurance company confirms the claim. What diagram
can be used tounderstand the state changes of the component triggered by events
and the dynamic
nature
Correct answer : state chart diagram

118. which of the following is not a principle of dsdm?


Ans = easy to understand modes

119.
Startprogram
Body{
Background-color : rgba(0,0,0,0);
}
Endprogram
Ans = fully transparant

120. in javascript what will be returned by the following code


snippet?
Startprogram
Document.write(new date().getmonth());
Endprogram
Ans = month as number from 0 to 11

121. class ClassA


protected void show(){
System.out.print("Super Class Method"),
}
class ClassB extends ClassA{
private void show(){ System.out.print("Sub Class Method");
}
public static void main(String[] args){ ClassB subObj = new ClassB();
subObj.show();
}
}
Ans = compite time error

122. class One {


}
class Two extends One {
}

public class Main {


static String s="Print";
public static void main(String[] args)
{
One[] a=new One[2];
Two[] b = new Two[2];
print(a);
print(b);
print(7);
System.out.println(s);
}

static void print (One[]...a2){


s +="1";
}
static void print(Two[]...b1) {
s += "2";
}
static void print(Two[] b1) {
s += "3";
}
static void print(Object o) {
s += "4";
}
}

Ans= print 434


123. . The object which is used to fetch the input from an element for
processing is ______
Ans= document

125. Which of the following tags is used to define a multi-line input field?
Ans: datalist /textarea

126. SPOT THE ERROR:


Observe the below algorithm to fifind the average of three numbers.
Step1: Start
Step2: Get num1, num2, num3
Step3: Add num1, num2, num3 and store it in Sum
Step4: Average=sum%3
Step5: Display Sum and Average
Step6: Stop
Identify the incorrect step(if any)
Ans= step4
startprogram

Select to_char(report_date,
‘Mon’) as MONTH, status
from AQI_DELHI;

Endprogram

22
333

Option 1 Ans=
startprogram
Echo “enter the number”
Read n
For((i=1;i<=n;i++))
Do for ((j=1;j<=i;j++))
Do
Echo -e “$i \c”
Done echo “ ”
Done
endprogram
red

What is the purpose of groupcount()


method with respect to regular
expressions? c
Ans= b and c

import java.util.ArrayList;
public class testuserMain{
public static void main(String[] anrgs)
{
ArrayList<String> a1=new ArrayList<String>(5);
a1.add("Ten");
a1.add("Twenty");
a1.add(4,"Fifty");
a1.add("thirty");
a1.add("Fourty" );
System.out.println(a1);}}

Ans= indexoutofbound

public class Parent{


public static final void displayATMAMOUNT()
{
System.out.println("500000");
}}
public class child extends Parent{
public void displayATMAMOUNT
{
System.out.println("600000");
}}
public static void main (String[] args) {
child c=new child();
c.displayATMAMOUNT();
}
Ans= CTE
which of the given phases consume more time during software life cycle
correct op9on: Maintenance

114. Which of the given options define a set of activities that transform the client needs to an
effective software solution
Ans-Software planning
Software cost estimation
Software development process
Software resource planning

. Root is super user in unix operating system and it is represented using___________


Ans=/

. Choose the statement that true about Class?


Ans
Class is a dynamic component
Class is described using attributes and methods
Change the class to change the state of an object
Class properties depends on object properties

. Carefully read the question and answer accordingly. In an array, if an item to be searched is
found in the middle of an array then it is said to be _____
ans= average case

. Which is the correct implementation for a progress bar in HTML5


Ans- #review
<progress value=”20” max=”100”></progress>

Class bird{
System.out.print("b1");
}
public Bird(){
System.out.print ("b2");
}
Correct answer:r1 E2 Testman b1 b2 E1 r2 M1

class ClassA{

protected void show(){

System.out.print("Super Class Method");


}}
class ClassB extends ClassA
{
private void show(){

System.out.print("Sub Class Method");


}

public static void main(String[] args)


{
ClassB subObj = new ClassB();
subObj.show();
}}
Ans=compilation error

Which of the following is used to reference data that can act as an abbreviation or can be
found at an external location?
Ans- ENTITY
In a CSS script, each property of an element is separated by a ______
Ans – semicolon (;)

46. Which jquery syntax hides all the paragraph elements


Ans-
$(“p”).hide();

Integer i=new Integer(-5);


Double d=new Double(new Integer(-6));
System.out.println(i%d);
short no=4;
System.out.println((no-i)*d);

Ans= -5.0
-54.0
1.Unix file system is a collection of files and directories organized in a ______
manner

Ans:- Hierarchy

2.appending content to existing file in vi editor can be done in mode.

1. Command mode
2. Insert mode
3. Append mode
4. Escape mode

3.Constraints ensures _______ and _________ of the data in the database

1. Correctness
2. Reliability
3. Reuse
4. Redundancy

4.Root is super user in unix operating system and it is represented


using___________

1. $
2. \
3. /
4. >

5.Which command is used to get intermediate result in a pipeline of commands in


Unix

1. tee
2. grep
3. wc
4. ls

6. Consider the following structure

Customer (custid,custnmae,address,city,country)
Choose the option display all customer who all are not from Hyderabad and delhi.

a. Select * from customer where city in(“Hyderabad”,”Delhi”);


b. Select * from customer where city < > in(“Hyderabad”,”Delhi”);
c. Select * from customer where city not in(“Hyderabad”,”Delhi”);
d. Select * from customer where city <>“Hyderabad” and city <>”Delhi”;

7. Which command in UNIX is used for clearing the Screen?

1. clrscr
2. cls
3. clear
4. clearscreen

8. Path is used to locate file in Unix filesystem. The types of path supported are
____ and ____

1. Absolute
2. Relative
3. Reference
4. Dynamic

9. “How to do” aspects is converted in a SRS document. State true/False.

1. False(0)
2. True(1)

10. Below statements is an example of path in unix.

$cd/home/course/CSE/C++

1. Absolute
2. Relative
3. Reference
4. Dynamic
11. In a binary search algorithm, if the element to be searched is lesse than the
pivot value (middle value), then _____________ is split in half

1. Right interval
2. Left interval
3. Half interval
4. Complier dependent

12. US Insurance project development team members are divided into two groups,
one team works in the development office in India and the other group works
onsite, i.e, at the client location So Programmers located in different locations is
not suitable for _______________ methodologies

1. Lean Software Development


2. Extreme Programming
3. Feature Driven Development
4. DSDM

13. A doubly linked list cannot be represented using a single pointer variable in
every node

1. False
2. True

14. Consider the following table structure and write a query to display all the
employees who have and don’t have department assigned

Emp(fname,lname,dno)

Dept(deptid,dname)

1. Select fname,deptid from emp e, dept d where e.dno(*)=d.deptid;


2. Select fname,deptid,dname from emp e left outer join dept d on
(e.dno=d.deptid);
3. Select fname,deptid,dname from emp e, dept d where.dno = d.deptid(*);
4. Select fname,deptid,dname from emp e full outer join dept d on
(e.no=d.deptid);
15. ______is the time duration for each sprint

1. 2-3 days
2. 2-5 hours
3. 2-4 weeks
4. 1 month

16. Name the Unix command to perform safe shut down a Unix system

a. halt
b. poweroff
c. shutdown
d. reboot

17. What is the command to concatenate fname and lname with a space in
between and display the output under the heading of “Full Name”?

Employee(eid,fname,lname,salary)

1. Select fname || “ “ || lname as ‘Full Name’ from employee;


2. Select fname || “ “ || lname ‘Full Name’ from employee;
3. Select fname & lname as ‘Full Name’ from employee;
4. Select fname & ‘ ‘ & lname ‘Full Name’ from employee;

18. A not null column cannot be created at table level during table creation. State
true/false.

1. False
2. True

19. . identify the type of control statement from the given option, in which the
program chooses two or more alternative path based on the result of a particular
expression that returns a Boolean value.

1. Sequential
2. All of the options
3. Decision
4. Iteration

20. which of the given options are true with respect to linked lists, when compared
to arrays

1. 1.Linked lists are dynamic in size


2. 2.Random access is possible in linked list
3. 3.Insertion and deletions are expensive in linked list
4. 4.All the options

21. A linear structure which follows a specific order in which the operations are
performed. Stack follows which of the given orders?

1. Last-In-First-Out
2. First-In-First-out
3. Bottom-Up
4. Top-Down

22. Which of the given data structures , is pointers concept applied.

1. Linked List
2. Stack
3. Queue
4. Binary Tree

23. Kernel of UNIX operating system is written using _____

1. C
2. C++
3. VC++
4. JAVA

24. consider a scenario: you have written a code to display a menu on the screen
and some operations are performed based on the given user input. Which control
structure would you use, so that the menu is guaranteed to show? display at least
once on the screen, before performing the operation
1. Do-While loop
2. For-Loop
3. While-Loop
4. None

25. Match the correct options with the characteristics of a good program

1) Cost effectiveness - A)Ability to handle most of the changes without having to


rewrite the entire program

2)Eficiency - B)Deals with the amount of time and memory space required for a
program

3)Portability - C) Ability to run on different platforms with or without minimal


changes

4) Flexibility – D) Deals with program quality without much Expenses

1. 1-A, 2-B, 3-C, 4-D


2. 1-D, 2-B, 3-C, 4-A
3. 1-D, 2-B, 3-A, 4-B
4. 1-B, 2-A, 3-D, 4-C

26. which of the following is not a principle of dsdm?

easy to understand modes

27. Agile methodology accepts change of requirement at any stage. State true or
false

1. True
2. False

28. predict the output display the loan type and the number of customers under
each loan type,

considering only those loan types which are taken by more than one customer.

1st option
29. Which of the given options are used to calculate the running time complexity
of an algorithm

ANS= Asymtotic notation

30. William is planning to develop software- Customer Feedback System, which


helps the department store to predict the sales target. His requirements are clear
but his requirements are not stable. Suggest a software development suitable for
this scenario.

1. Prototype Model
2. Water Fall Model
3. Rapid Application Development Model
4. Spiral Model

31. In which of the given data structures, does the implementation becomes
difficult?

1. Linked list
2. Stack
3. Array
4. Graph

32. which of the command displays all login names and the number of users
logged in.

1. Who -u
2. Who -q
3. Who -H
4. Who -m

33. which of the following operations can be used instead of the or operator
when there are multiple values that need to be compared

1. IN
2. LIKE
3. OR
4. AND

34. which of the following method is used to convert date from one format to
other?

1. to_Char();
2. to_Date();
3. convert();
4. default();

35. Which of the following options are false with respect to trees.

1. A tree which does not have any node other than the root node has depth of
zero
2. tree without any nodes is called as null tree
3. a tree with n nodes has exactly n branches or degree
4. All of the above

36. If you create a view WITH READ ONLY option, it can only be viewed andnot
updated. State true/false.

1. True
2. False

37. Match the function name with the corresponding description

1)NVL 2)NVL2 3)COALESCE 5)NULLIF

WITH

A)Converts null to an actual value B)if the first expression is not null, the
second expression is returned and if the first expression is null, the third
expression is returned C)Returns the first not null expression present in the
expression list D)Compares two expressions and returns nut if they are equal

1. 1-D, 2-B, 3-C, 4-A


2. 1-A, 2-C, 3-D, 4-B
3. 1-D, 2-C, 3-B, 4-A
4. 1-A, 2-B, 3-C, 4-D

38. what will be the xsd definition for the following element40?

1. <xs:element name=”age” type=”xs:integer”/>


2. <xs:element name=”age” type=”Integer”/>
3. <element name=”age” type=”xs:integer”/>
4. <xs:element name=”age” type=”xs:int”/>

39. The WHERE clause cannot be used to apply additional conditions inSELECT
statement containing the ON or the USING clause. State true/false.

1. True
2. False

40. What is true regarding State Chart Diagram?

1. Depicts different states of an object during lifetime


2. Flow of activity
3. Chart diagram of objects
4. Static view of objects

41. Which of the following pair is equivalent to one another

1. Startprogram

-,minus()

2. Startprogram

||,or

3. Startprogram

<>,!=

4. Startprogram

!= and NOT IN
42. The company needs to change the job title ‘officer’ to ‘Administrative officer’
for all officers. Which statement does this

Ans= update employee job=’Administrative officer’ where upper=’officer’;

43. Match the following

1JINNER JOIN 2)LEFT OUTERJOIN 4)RIGHT OUTER JOIN 5)FULL OUTER JOIN

WITH

A) Returns records that have matching values in both tables B) Returns the
matched records from the

right table, and all records from the left table C) Returns the matched records
from the left table, and

all records from the right table D) Returns all records when there is a match in
either left or right

table

1. 1-d,2-c,3-b,4-a
2. 1-d,2-b,3-c,4-1
3. 1-d,2-b,3-a,4-c
4. 1-a,2-b,3-c,4-d

44. Select the statements that are true about Persistence

1. Persistence is a way through which the life time of object exists even after
the program terminates
2. Java uses serialization for object persistence
3. Persistence is a way through which the life time of object is terminated as
the program terminates
4. Persistence of object is done by java runtime automatically

45. Choose the statement that true about Class?

1. Class is a dynamic component


2. Class is described using attributes and methods
3. Change the class to change the state of an object
4. Class properties depends on object properties

46. Information hiding is achieved through which OOP principle?

1. Abstraction
2. Encapsulation
3. Typing
4. Hierarchy

47. What is the relationship between these two Building has rooms

1. Composition
2. Aggregation
3. Generalization
4. Hierarchy

48. What are the best ways to ensure that a class implements the required
behavior?

1. Use Interface
2. Method inside interface are public and abstract
3. Have a strict testing
4. Use encapsulation

49. which jquery syntax hides all the paragraph elements

1. $(“p”)hide();
2. $(p)hide();
3. $(“p”)-hide();
4. (“p”)hide();

50. 3. Consider the file staff data which has the following content

1:Anu Professor 85000 y

2 Sam Associate Professor 150000 5yrs


3.John Professor 75000 6yrs

4.Suresh Associate Professor 150000 5yrs Which is the command to display the
outbusas

tolos?

Suresh Associate Professor

Sam Associate Professor

John Professor

Anu Professor

ANS:-cut -d: -f 2,3 staff dat|sort -r

51. Which attribute of schema element is used to identify the default namespace

1. 1.target Name space


2. 2.xmlns
3. 3.elementFormDefault
4. 4.version

52. Consider the file “sample.txt” which has following content,

Peter piper picked a peck of pickledpeppers

A peck of pickle peppers peter piper pickled

if peter piper pickled a peck of pickled pepper

Where is the peck of pickled peppers?

Which is the command to replace peter as puppy?

Ans: sed > PeterPuppy’,’ sample.txt

53. What is the purpose of groupcount() method with respect to regular


expressions?
1. To find the matched subsequence
2. To find the number of unmatched subsequence
3. To find the total number of matched subsequence
4. To find the count of subsequence present

54. What string datatype can be used for a string that does not contain line
feeds,carriage return or tabs.

1. xs:string
2. xs:name
3. xs:nospace
4. normalized string

55. Sita wishes to greet the user when the user clicks on “Greet me” button in
which event does she need to write the javascript code for greeting the user?

1. Onchange
2. Onmouseover
3. Onclick
4. Onmouseclick

56. Which of the following can be the parent tag for<figcaption> element?

Tag 1: <figure>

Tag 2: <footer>

Tag 3: <caption>

1. Tag 1 and Tag 3 only


2. Tag 1 only
3. Tag 2 only
4. Tag 3 only
5. Tag 1, Tag 2, Tag 3

57. Which is the HTML5 equivalent of <div id=” content”>

1. <section>
2. <body>
3. <articles>
4. <header>

58. The following XML fragment is legal.

Startprogram

<2020SalesReport>

<income>1000000</income>

<profit>500000</profit>

</2020SalesReport>

Endprogram

1. True
2. False

59. startprogram

public interface studentmark{

/*insert code here*/ int mark=100;

endprogram

which modifiers when inserted in the above code will provide compilation

errors? (choose two)

1. final
2. static
3. abstract
4. private
5. public
60. Consider the following css code snippet

Startprogram

H1{

Text-shadow : 2px 3px 5px;

Endprogram

Choose the appropriate appearance for the text……….

Ans= horizontal shadow 2px,vertical shadow 3px,blur 5px

61. Which script displays an alert box with the required information when a
button with the

name msgbtn is clicked

1. <script>document.getElementById(“msgbtn”).addEventListener(“click”,fu
nction(){alert(“Welcome to button clicks!”);});</script>
2. <script>document.getElementById(“msgbtn”).EventListener(“click”,functio
n(){alert(“Welcome to button clicks!”);});</script>
3. <script>document.getElementById(“msgbtn”).includeEventListener(“click”,f
unction(){alert(“Welcome to button clicks!”);});</script>
4. <script>document.getElementById(“msgbtn”).addEventListener(“click”,func
tion={alert(“Welcome to button clicks!”);));</script>

62. which of the below are functional interfaces?

1. Clonable
2. Serialization
3. Autocloseable
4. Comparable
5. Comparator
63. When constructing looping statements, if the iteration condition Is not
terminated, it will result in infinite loop. State True or false

1. True
2. False

64. Amaze Agencies, Customers can apply for loan. To apply loan the customers
should get registered first then apply for the loan. The admin will approve the
loan and then the loan will be issued to the customer. Identify the classes in
above scenario.

1. Customer, Loan
2. Customer, Loan, Register.
3. Customer, ApplyLoan, Register.
4. Customer, ApplyLoan, Register, IssueLoan

65. choose the data control Language commands?

1. COMMIT
2. GRANT
3. ROLLBACK
4. REVOKE

66. is used to alter the program flow, when a set of statements need to be
executed only if a condition is fulfilled.

1. Conditional statement
2. Looping statement
3. Iterative statement
4. Sequential Statements

67. Bonus calculated module was unit tested by the developer. Depending on the
salary the bonus needs to be calculated. Assume if one the salary range is
between 30000 to 40000 then the bonus should be 10%.From the given op9ons
iden9fy the test cases for equivalence portioning

1. 25000,35000,45000
2. 25000,27000,29000
3. 42000,43000,45000
4. 32000,35000,39000

68. Which of the following algorithm(s) is/are said to be non-adaptive?

1. Selection sort
2. Merge sort
3. Bubble sort
4. Insertion sort

69. ERD Example consider the given scenario. A product may or may not have a
sale. A sale can have one or more products. Identify the optionality between the
product and sales

1. 1..0
2. 0..0
3. 1..1
4. 0..1

70. order the types of cohesion from the worst cohesion to the best cohesion

a. functional cohesion
b. co-incidental cohesion
c. communicational cohesion
d. temporal cohesion
e. procedural cohesion
f. logical cohesion
g. sequential cohesion
1. b,f,d,e,c,g,a
2. d,e,f,g,a,b,c
3. a.b.c.d.e.f.g
4. g.f.e.d.c.b..a

71. . Which is the correct implementation for a progress bar in HTML5


1. <progress value=”20” max=”100”></progress>
2. <progress value:20 max:100></progress>
3. <progress value max=”20”,”100”></progress>
4. <progress value=”20” and max=”100”></progress>

72. Efficiency of an algorithm is based on the CPU ,Memory Usage, Disc usage and
network usage. State true of false?

1. True
2. False

73. in CSS, which of the following code/ codes can be used for colouringa

table background in red?

Code 1: table {background-color: red; }

Code 2: table {bgcolor: red;}

Code 3: table {background: red;}

1. Code 1 and Code 2 only


2. Code 1 and Code 3 only
3. Code 1 only
4. Code 3 only
5. Code 1, code 2 and code 3

74. Choose legal identifiers from the below options:

1. 4thvariable
2. _98_
3. &count
4. $says
5. New

75. Consider the scenario. For an insurance, customer makes a claim. The claim
can be a normal or a critical claim. The insurance company confirms the claim.
What diagram can be used to understand the state changes of the component
triggered by events and dynamic nature?

a) Sate chart diagram


b) Sequence diagram
c) Activity diagram
d) Interaction diagram

76. choose the methods(s) of the stringbuilder class

a) Intern()
b) Delete()
c) Append()
d) Reverse()
e) Replace()

77.If an element is to be retrieved from a specific location in an array, the array


has to be _____

a) Traversed from the first position until the element is found


b) Added in ascending order and compared with each element
c) Traversed from the last position to first until the element is found
d) Sorted in descending order and compared with each element.

78. Which of the given options define a set of activities that transform the client
needs to an effective software solution

a) Software planning
b) Software cost estimation
c) Software development process
d) Software resource planning

79. Statement 1 : an include relationship between usecase means the included


usecase will be called every time the base usecase is executed
Statement 2 : an extends relationship between usecase means the extended
usecase is executed only when a given condition is true

Identify the correct statement

a) Only Statement 1 is Correct


b) Only Statement 2 is Correct
c) Both statement 1 and 2 are true
d) Both statement 1 and 2 are false

80. You need to analyze the time duration from the time that your orders are
placed to the time that your orders are shipped. To do this, you must create a
report that displays the customer number, date ordered, date shipped, and the
number of monthsin whole numbersfrom the time the order is placed to the time
the order is shipped Which statement produces the required results

a) SELECT customer_id, order_date, shipping_date, ROUND(DAYS BETWEEN


(shipping_dale, order_date)) 30) Time Taken FROM order,
b) SELECT customer_id, order_date, shipping_date,ROUNDOFF(shipping_date
order_date) Time Taken FROM order
c) SELECT customer_id, order_date, shipping_date,MONTHS BETWEEN
(shipping_da order_date) Time TakenFROM order,
d) SELECT customer_id, order_date, shipping_date ROUND(MONTHS
BETWEEN (shipping_date, ter_date)) Time Taken FROM order,

81. which uml diagram is capable to depict conditional branching and loop
execution?

a) Usecase diagram
b) Sequence Diagram
c) Both

82. which is not a jquery method.

a) Text()
b) Html()
c) Val()<br>
d) Body()

83. am and Rose are working on the Lone Monitoring project. The head version
was checked out by both Sam and Rose, both of them made their changes in the
local machine. Both of them made the required changes and updated the same to
the server. From the given options identify the correct option

a) Both their changes get committed to the server


b) First person change gets committed while for the second one the server
notices life differences
c) Both the project gets rolled back
d) Second project gets overwritten by the first one

84. In HTML, base tag should be used inside the head section only.

a) True
b) False

85. White box testers should require the working knowledge of the code being

1. True
2. False

86. Spot the error. Observe the given algorithm to calculate the simple interest.
Identify the incorrect step (if any)

Step 1: Start

Step2: Get priniciple_amount,no_of years,rate_of_interst

Step3: Multiply priniciple_amount,no_of years,rate_of_interst and store it in


result

Step4: Simple_Interest=result%100

Step5: Display Simple Interest


Step6: Stop
Ans: Step 4

87

1.

22

333

Option 1 Ans=

startprogram

Echo “enter the number”

Read n

For((i=1;i<=n;i++))

Do for ((j=1;j<=i;j++))

Do

Echo -e “$i \c”

Done echo “ ”

Done

endprogram

88. A manufacturing company administration

Option A

89:- Which of the following are the correct ways to declare an array?
Ans:- b & c

90. What will be the code to create a text box which accepts only 4 digit numbers

Ans = <input type=”text” name=”pin” pattern=”*0-9+,4-”>

Predict The Output


1. class High{

public High(String s){

System.out.print("From High");

public class Main extends High{

public Main(String s){

System.out.print("From Low");

public static void main(String[] args){

new Main("High Low");

System.out.prinln("");

1. From High
2. From Low
3. High Low
4. Compilation Error(Option D)

2. public class Main

public void printVal(Integer i)

System.out.println("Integer "+i);

} public void printVal(int i)

System.out.println("Int "+i);

public static void main(String[] args) { new Main().printVal(127); }

Ans: int 127

3. class BlackBoard{

Short story=200;

BlackBoard write(BlackBoard bb)

bb=null;

return bb;

}
public static void main(String[] args)

BlackBoard b1=new BlackBoard();

BlackBoard b2=new BlackBoard();

BlackBoard b3=b1.write(b2);

b1=null;

}
Ans:- 1

4. public class demo

static int num1=85;

int num2=58;

display();

num1=58;

num2=85;

void display()

System.out.println("num1="+num1);
System.out.println("num2="+num2);

public static void main(String d[])

demo myobj=new demo();

myobj.display();

}}
Ans:-num1=85

num2=58

num1=58

num2=85(Option A)

5. public class TestMain

index=1;

int index;

public static void main(String[] args)

new TestMain().find();

}
void find(){

int[][]d = {{7,8,9},{4,5,6},{0,1,2,3}};

System.out.println(d[index++][index++]);

Ans = 6(Option A)

6. What is the output of the query: startprogram

Select substr(“Stay home! Stay safe!!”,1)from dual;

End program
Ans:- Stay home ! Stay safe!!(Option 1)

7. Integer i=new Integer(-5);

Double d=new Double(new Integer(-6));

System.out.println(i%d);

short no=4;

System.out.println((no-i)*d);

Ans= -5.0

54.0(Option C)

8. import java.util.*;

public class Main

public static void main(String[] args)

{
String[] str={"Banana","Apple","Watermelon","Mango"};

sortFruit o=new sortFruit();

Arrays.sort(str,o);

for(String s: str)

System.out.print(s+" ");

System.out.println(Arrays.binarySearch(str,"map"));

static class sortFruit implements Comparator<String>

public int compare(String str1,String str2)

return str2.compareTo(str1);

Ans = Watermelon Mango Banana Apple -5

9. class ClassA

protected void show(){

System.out.print("Super Class Method"),

class ClassB extends ClassA{

private void show(){ System.out.print("Sub Class Method");


}

public static void main(String[] args){ ClassB subObj = new ClassB();

subObj.show();

Ans = compile time error

10. Import java.u9l.*;

public class TestMain{

Public sta9c void main(String[] args){

String[] str={“Banana”,”Apple”,”Watermelon”,”Mango”};

sortFruit 0=new sortFruit();

Arrays.sort(str,o);

for(String s: str)

System.out.print(s+” “);

System.out.println(Arrays.binarySearch(str,”map”));

sta9c class sortFruit implements Comparator<String>{

public int compare(String str1,Sring str2);

return Str2.compareTo(str1);

}}

correct Option: A

11. class Television


{

public void getPictureResolution(){

System.out.println("Video Quality is low");

}}

public class smartTv extends Television{

public void getPictureResolution(){

System.out.println("Video Quality is high");

public static void main(String[] args) {

try{

((smartTv)new Television()).gePictureResoution();

catch(ClassCastException e)

{System.out.print("Class cast exception was caught");

finally{

System.out.println("Finally");

}
Ans=

video quality is high


finally(Option A)

12. public class Main

System.out.print("Hello");

public display()

System.out.print("display");

public static void main(String s[])

System.out.print("hai");

display dobj1=new display();

display dobj1=new display();

Ans = haiHellodisplayHellodisplay
13. In javascript what will be returned by the following code

snippet?

Startprogram

Document.write(new date().getmonth());

Endprogram
Ans = month as number from 0 to 11 format (Option A)
14. In what colour will be the heading appear, from the above lines of code?(Red,
Green, Blue,myclass)

Ans:- Red(Option A)

15.Xonsider the following CSS code snippet

Startprogram

Body{

Background-color : rgba(0,0,0,0);

Endprogram

What will be the background appearance of the body section?

Ans = fully transparant

16. public class Main{

public static void main (String[] args){

String a[]=new String[-9/-4];

int b=a.length;

System.out.print(new

String[]{"Harley","Aprilla","Kawasaki","Triumph","Guzz"}[0]);

}}

Ans = Kawasaki (Option D)


17. class TestMain{

public static void main (String[] args) {

Map<Tasks, String> m= new HashMap<Tasks, String>();

Tasks t1 = new Tasks("Jan");

Tasks t2 = new Tasks("Jan");

Tasks t3 = new Tasks("Apr");

m.put(t1,"Design");

m.put(t2,"Code");

m.put(t3,"Develop");

System.out.println(m.size());

class Tasks{

String day;

Tasks(String d){

day=d;

public boolean equals(Object o){

return((Tasks)o).day==this.day;

public int hashcode()


{

return 0;

Correct option: 3

You might also like