search
Log In

Recent questions tagged java

0 votes
1 answer
1
Given the array of integers ‘array’ shown below: $\begin{array}{|c|c|c|c|c|c|c|c|c|c|} \hline 13 & 7 & 27 & 2 & 18 & 33 & 9 & 11 & 22 & 8 \\ \end{array}$ What is the output of the following JAVA statements? int[]p= new int [10]; int[]q= new int [10]; for ( int k=0; k<10; k++) p[k]= array [k]; q=p; p[4]=20; System.out.println(array[4]+":"+q[4]); $20:20$ $18:18$ $18:20$ $20:18$
asked Mar 24 in Object Oriented Programming jothee 65 views
0 votes
2 answers
2
Consider the following JAVA program: public class First { public static int CBSE (int x) { if (x < 100)x = CBSE (x+10); return (x-1); } public static void main(String[]args){ System.out.print(First.CBSE(60)); } } What does this program print? $59$ $95$ $69$ $99$
asked Mar 24 in Object Oriented Programming jothee 83 views
0 votes
1 answer
3
Which of the following statement(s) with regard to an abstract class in JAVA is /are TRUE ? An abstract class is one that is not used to create objects An abstract class is designed only to act as a base class to be inherited by other classes Only I only II Neither I nor II Both I and II
asked Mar 24 in Object Oriented Programming jothee 47 views
1 vote
2 answers
4
What is the output of the following JAVA program? public class Good { private int m; public Good (int m){this.m=m;} public Boolean equals (Good n) {return n.m==m;} public static void main (string args[]){ Good m1 = new Good(22); Good m2 = new Good(22); Object ... .out.println(s1.equals(m2)); } } True, True, False, False True, False, True, False True, True, False, True True, False, False, False
asked Jul 2, 2019 in Java Arjun 288 views
1 vote
3 answers
5
What is the output of the following JAVA program? class simple { public static void main(String[ ] args) { simple obj = new simple(); obj.start(); } void start() { long [] P = {3, 4, 5}; long [] Q = method (P); System.out.print (P[0] + P[1] +P[2]+”:”); System.out.print (Q[0] + Q[1] + Q[2]); } long [ ] method (long [ ] R) { R[1] = 7; return R; } } //end of class 12:15 15:12 12:12 15:15
asked Jul 13, 2018 in Java Pooja Khatri 1.2k views
0 votes
3 answers
6
In Java, which of the following statements is/are TRUE? S1: The final' keyword applied to a class definition prevents the class form being extended through derivation S2: A class can only inherit one class but can implement multiple interfaces S3: Java permits a class to replace the ... . It is called method overloading Code: S1 and S2 only S1 and S3 only S2 and S3 only All of S1, S2 and S3
asked Jul 13, 2018 in Object Oriented Programming Pooja Khatri 570 views
0 votes
1 answer
7
Which of the following statements is/are true? P: C programming language has a weak type system with static types. Q: Java programming language has a string type system with static types Code: P only Q only Both P and Q Neither P nor Q
asked Jul 13, 2018 in Programming Pooja Khatri 681 views
0 votes
0 answers
8
What is the output of the following JAVA program ? Class Test { public static void main (String [ ] args) { Test obj = new Test ( ); obj.start ( ); } void start ( ) { String stra= do ; String strb = method (stra); System.out.print( : + stra + strb); } String ... ; System.out.print (stra); return good ; } } (1) dogood : dogoodgood (2) dogood : gooddogood (3) dogood : dodogood (4) dogood : dogood
asked Jun 29, 2018 in Others Roma_nagpal 321 views
0 votes
0 answers
9
I want some information about the programming language java.What is java?what are the features of java?And what are the structure of java program and compare java with c++.explain about java in simple example.How this best essay writing service is helping to get the genuine essay? Is this service is beneficial?
asked Jun 14, 2018 in Programming AlexanderGallaghers 61 views
1 vote
1 answer
10
2 votes
1 answer
11
1 vote
0 answers
12
What is the correct Answer ? My answer is 90 and given answer is no output how?
asked Jan 14, 2018 in Programming Harikesh Kumar 83 views
1 vote
1 answer
13
2 votes
0 answers
14
please explain it
asked Jan 14, 2018 in Programming Harikesh Kumar 42 views
2 votes
0 answers
15
Please explain in detail
asked Jan 14, 2018 in Programming Harikesh Kumar 49 views
2 votes
1 answer
16
Why option a and d are wrong ....I know the answer ...please explain only why option are wrong
asked Jan 14, 2018 in Programming Harikesh Kumar 102 views
1 vote
1 answer
17
asked Jan 13, 2018 in Programming Harikesh Kumar 75 views
3 votes
4 answers
18
Which of these is a super class of all errors and exceptions in the Java language? Runtime Exceptions Throwable Catchable None of the above
asked May 7, 2017 in Java sh!va 3.4k views
2 votes
1 answer
19
Which of the following statements is false ? (A) A servlet can be invoked through a JavaScript (B) A servlet can be invoked through an applet (C) A servlet is executed on the server side (D) A servlet instance is created for each client request
asked Mar 6, 2017 in Web Technologies Beyonder 359 views
0 votes
3 answers
20
Consider the following JAVA program: public class First { public static int CBSE (int x) { if (x<100) x = CBSE(x+10); return(x-1); } public static void main (String[] args) { System.out.print(First.CBSE(60)); } } What does this program print? 59 95 69 99
asked Jan 31, 2017 in Java jothee 2.4k views
2 votes
3 answers
21
Java uses threads to enable the entire environment to be ______. Symmetric Asymmetric Synchronous Asynchronous
asked Oct 4, 2016 in Java makhdoom ghaya 1.1k views
1 vote
1 answer
22
Which of the following is not a correct statement ? Every class containing abstract method must be declared abstract. Abstract class can directly be initiated with ‘new’ operator. Abstract class can be initiated. Abstract class does not contain any definition of implementation.
asked Oct 1, 2016 in Java makhdoom ghaya 285 views
1 vote
2 answers
23
Method over-riding can be prevented by using final as a modifier at ______. The start of the class. The start of method declaration. The start of derived class. The start of the method declaration in the derived class.
asked Oct 1, 2016 in Java makhdoom ghaya 547 views
0 votes
0 answers
24
Write a Sample Test Application using Spring Framework to retrieve a bean that is declared in classpath application context.
asked Sep 24, 2016 in Programming सुमित सिंह 71 views
0 votes
1 answer
25
Spot the features that are present in C++ not in Java: I. New operator II. Delete opeartor III. Objects stored in stack memory. IV . Objects stored in Heap memory a. III only b. II and III only c. III only d. All features are present in C++ and Java
asked Sep 2, 2016 in Programming sh!va 107 views
0 votes
0 answers
26
Can anyone suggest s good MCQ Book for JAVA for experienced posts!
asked Sep 2, 2016 in Job Queries sh!va 197 views
1 vote
2 answers
27
Portable program means Program with wheels Independent from its authors Independent of platform None of the above
asked Aug 23, 2016 in Others makhdoom ghaya 279 views
2 votes
1 answer
28
When one object reference variable is assigned to another object reference variable then a copy of the object is created a copy of the reference is created a copy of the reference is not created It is illegal to assign one object reference variable to another object reference variable
asked Aug 20, 2016 in Object Oriented Programming jothee 1.4k views
2 votes
2 answers
29
Which of the following statements is correct? Every class containing abstract method must not be declared abstract Abstract class cannot be directly initiated with new operator Abstract class cannot be initiated Abstract class contains definition of implementations
asked Aug 20, 2016 in Java jothee 1.5k views
2 votes
1 answer
30
It is possible to define a class within a class termed as nested class. There are __ types of nested classes 2 3 4 5
asked Aug 20, 2016 in Object Oriented Programming jothee 1.3k views
...