0% found this document useful (0 votes)
48 views

Oops QB

The document contains a set of questions and answers related to Java programming concepts like OOPs, inheritance, encapsulation, polymorphism, method overloading, selection statements, operators, and more. It tests the understanding of these concepts through multiple choice questions. The questions cover basic as well as advanced Java topics.

Uploaded by

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

Oops QB

The document contains a set of questions and answers related to Java programming concepts like OOPs, inheritance, encapsulation, polymorphism, method overloading, selection statements, operators, and more. It tests the understanding of these concepts through multiple choice questions. The questions cover basic as well as advanced Java topics.

Uploaded by

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

KCG COLLEGE OF TECHNOLOGY

DEPARTMENT OF CSE & IT


CS8392:OBJECT ORIENTED PROGRAMMING

UNIT I INTRODUCTION TO OOP AND JAVA FUNDAMENTALS


1. Which of the following is not OOPS concept in Java?
a) Inheritance
b) Encapsulation
c) Polymorphism
d) Compilation
2. When does method overloading is determined?
a) At run time
b) At compile time
c) At coding time
d) At execution time
3. When Overloading does not occur?
a) More than one method with same name but different method signature
and different number or type of parameters
b) More than one method with same name, same signature but different
number of signature
c) More than one method with same name, same signature, same number
of parameters but different type
d) More than one method with same name, same number of
parameters and type but different signature
4. Which concept of Java is achieved by combining methods and attribute into
a class?
a) Encapsulation
b) Inheritance
c) Polymorphism
d) Abstraction
5. What would be the output of the following code snippet if variable a=10?

1.if(a<=0)
2.{
3. if(a==0)
4. {
5. System.out.println("1 ");
6. }
7. else
8. {
9. System.out.println("2 ");
10. }
11. }
12. System.out.println("3 ");

a) 1 2
b) 2 3
c) 1 3
d) 3
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

6. What is true about a break?


a) Break stops the execution of entire program
b) Break halts the execution and forces the control out of the loop
c) Break forces the control out of the loop and starts the execution of next
iteration
d) Break halts the execution of the loop for certain time frame
7. What is true about do statement?
a) do statement executes the code of a loop at least once
b) do statement does not get execute if condition is not matched in the first
iteration
c) do statement checks the condition at the beginning of the loop
d) do statement executes the code more than once always
8. What is the valid data type for variable “a” to print “Hello World”?

switch(a)
{
System.out.println("Hello World");
}
a) int and float
b) byte and short
c) char and long
d) byte and char
9. Which of these are selection statements in Java?
a) if()
b) for()
c) continue
d) break
10. What will be the output of the following Java program?

1. class selection_statements
2. {
3. public static void main(String args[])
4. {
5. int var1 = 5;
6. int var2 = 6;
7. if ((var2 = 1) == var1)
8. System.out.print(var2);
9. else
10. System.out.print(++var2);
11. }
12. }

a) 1
b) 2
c) 3
d) 4
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

11. What will be the output of the following Java program?

1. class comma_operator
2. {
3. public static void main(String args[])
4. {
5. int sum = 0;
6. for (int i = 0, j = 0; i < 5 & j < 5; ++i, j =
i + 1)
7. sum += i;
8. System.out.println(sum);
9. }
10. }

a) 5
b) 6
c) 14
d) compilation error

12. What will be the output of the following Java program?

1. class Output
2. {
3. public static void main(String args[])
4. {
5. int a = 5;
6. int b = 10;
7. first:
8. {
9. second:
10. {
11. third:
12. {
13. if (a == b >> 1)
14. break second;
15. }
16. System.out.println(a);
17. }
18. System.out.println(b);
19. }
20. }
21. }

a) 5 10
b) 10 5
c) 5
d) 10

13. What should be expression1 evaluate to in using ternary operator as in this


KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

line?

expression1 ? expression2 : expression3


a) Integer
b) Floating – point numbers
c) Boolean
d) None of the mentioned

14. What is the order of precedence (highest to lowest) of following operators?

1. &
2. ^
3. ?:
a) 1 -> 2 -> 3
b) 2 -> 1 -> 3
c) 3 -> 2 -> 1
d) 2 -> 3 -> 1

15. What will be the output of the following Java code?

1. class operators
2. {
3. public static void main(String args[])
4. {
5. int var1 = 5;
6. int var2 = 6;
7. int var3;
8. var3 = ++ var2 * var1 / var2 + var2;
9. System.out.print(var3);
10. }
11. }

a) 10
b) 11
c) 12
d) 56

16. What will be the output of the following Java code?

1. class operators
2. {
3. public static void main(String args[])
4. {
5. int x = 8;
6. System.out.println(++x * 3 + " " + x);
7. }
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

8. }

a) 24 8
b) 24 9
c) 27 8
d) 27 9

17. Which of these operators can skip evaluating right hand operand?
a) !
b) |
c) &
d) &&
18. Which of these statements is correct?
a) true and false are numeric values 1 and 0
b) true and false are numeric values 0 and 1
c) true is any non zero value and false is 0
d) true and false are non numeric values
19. What will be the output of the following Java code?

1. class Relational_operator
2. {
3. public static void main(String args[])
4. {
5. int var1 = 5;
6. int var2 = 6;
7. System.out.print(var1 > var2);
8. }
9. }

a) 1
b) 0
c) true
d) false

20. What will be the output of the following Java code?

1. class bool_operator
2. {
3. public static void main(String args[])
4. {
5. boolean a = true;
6. boolean b = !true;
7. boolean c = a | b;
8. boolean d = a & b;
9. boolean e = d ? b : c;
10. System.out.println(d + " " + e);
11. }
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

12. }

a) false false
b) true ture
c) true false
d) false true

21. What will be the output of the following Java code?

1. class ternary_operator
2. {
3. public static void main(String args[])
4. {
5. int x = 3;
6. int y = ~ x;
7. int z;
8. z = x > y ? x : y;
9. System.out.print(z);
10. }
11. }

a) 0
b) 1
c) 3
d) -4

22. What will be the output of the following Java code?

1. class Output
2. {
3. public static void main(String args[])
4. {
5. int x , y = 1;
6. x = 10;
7. if (x != 10 && x / 0 == 0)
8. System.out.println(y);
9. else
10. System.out.println(++y);
11. }
12. }

a) 1
b) 2
c) Runtime error owing to division by zero in if condition
d) Unpredictable behavior of program

23. What will be the output of the following Java code?


KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

1. class Output
2. {
3. public static void main(String args[])
4. {
5. boolean a = true;
6. boolean b = false;
7. boolean c = a ^ b;
8. System.out.println(!c);
9. }
10. }

a) 0
b) 1
c) false
d) true

24. Which operator is used to invert all the digits in a binary representation of a
number?
a) ~
b) <<<
c) >>>
d) ^
25. Which right shift operator preserves the sign of the value?
a) <<
b) >>
c) <<=
d) >>=
26. Which of these statements are incorrect?
a) The left shift operator, <<, shifts all of the bits in a value to the left
specified number of times
b) The right shift operator, >>, shifts all of the bits in a value to the right
specified number of times
c) The left shift operator can be used as an alternative to multiplying by 2
d) The right shift operator automatically fills the higher order bits
with 0
27. What will be the output of the following Java program?

1. class bitwise_operator
2. {
3. public static void main(String args[])
4. {
5. int var1 = 42;
6. int var2 = ~var1;
7. System.out.print(var1 + " " + var2);
8. }
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

9. }

a) 42 42
b) 43 43
c) 42 -43
d) 42 43

28. What will be the output of the following Java program?

1. class bitwise_operator
2. {
3. public static void main(String args[])
4. {
5. int a = 3;
6. int b = 6;
7. int c = a | b;
8. int d = a & b;
9. System.out.println(c + " " + d);
10. }
11. }

a) 7 2
b) 7 7
c) 7 5
d) 5 2

29. What will be the output of the following Java program?

1. class Output
2. {
3. public static void main(String args[])
4. {
5. int a = 1;
6. int b = 2;
7. int c = 3;
8. a |= 4;
9. b >>= 1;
10. c <<= 1;
11. a ^= c;
12. System.out.println(a + " " + b + " " +
c);
13. }
14. }

a) 3 1 6
b) 2 2 3
c) 2 3 4
d) 3 3 6
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

30. What is the stored in the object obj in following lines of Java code?

box obj;
a) Memory address of allocated memory of object
b) NULL
c) Any arbitrary pointer
d) Garbage

31. 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;
32. Which of these operators is used to allocate memory for an object?
a) malloc
b) alloc
c) new
d) give
33. Which of these 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
34. What will be the output of the following Java program?

1. class main_class
2. {
3. public static void main(String args[])
4. {
5. int x = 9;
6. if (x == 9)
7. {
8. int x = 8;
9. System.out.println(x);
10. }
11. }
12. }

a) 9
b) 8
c) Compilation error
d) Runtime error

35. What will be the output of the following Java program?


KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

1. class box
2. {
3. int width;
4. int height;
5. int length;
6. }
7. class mainclass
8. {
9. public static void main(String args[])
10. {
11. box obj = new box();
12. obj.width = 10;
13. obj.height = 2;
14. obj.length = 10;
15. int y = obj.width * obj.height *
obj.length;
16. System.out.print(y);
17. }
18. }

a) 12
b) 200
c) 400
d) 100

36. What will be the output of the following Java program?

1. class box
2. {
3. int width;
4. int height;
5. int length;
6. }
7. class mainclass
8. {
9. public static void main(String args[])
10. {
11. box obj1 = new box();
12. box obj2 = new box();
13. obj1.height = 1;
14. obj1.length = 2;
15. obj1.width = 1;
16. obj2 = obj1;
17. System.out.println(obj2.height);
18. }
19. }

a) 1
b) 2
c) Runtime error
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

d) Garbage value

37. Which component is used to compile, debug and execute java program?
a) JVM
b) JDK
c) JIT
d) JRE
38. Which statement is true about java?
a) Platform independent programming language
b) Platform dependent programming language
c) Code dependent programming language
d) Sequence dependent programming language
39. What is the extension of java code files?
a) .class
b) .java
c) .txt
d) .js
40. How can we identify whether a compilation unit is class or interface from
a .class file?
a) Java source file header
b) Extension of compilation unit
c) We cannot differentiate between class and interface
d) The class or interface name should be postfixed with unit type
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

UNIT II INHERITANCE AND INTERFACES


1. Which of this keyword can be used in a subclass to call the constructor of
superclass?
a) super
b) this
c) extent
d) extends
2. What is the process of defining a method in a subclass having same name
& type signature as a method in its superclass?
a) Method overloading
b) Method overriding
c) Method hiding
d) None of the mentioned
3. Which of these keywords can be used to prevent Method overriding?
a) static
b) constant
c) protected
d) final
4. Which of these is correct way of calling a constructor having no parameters,
of superclass A by subclass B?
a) super(void);
b) superclass.();
c) super.A();
d) super();
5. At line number 2 in the following code, choose 3 valid data-type
attributes/qualifiers among “final, static, native, public, private, abstract,
protected”

1.public interface Status


2. {
3. /* insert qualifier here */ int MY_VALUE = 10;
4. }

a) final, native, private


b) final, static, protected
c) final, private, abstract
d) final, static, public

6. Which of these is supported by method overriding in Java?


a) Abstraction
b) Encapsulation
c) Polymorphism
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

d) None of the mentioned


7. What will be the output of the following Java program?

1. class Alligator
2. {
3. public static void main(String[] args)
4. {
5. int []x[] = {{1,2}, {3,4,5}, {6,7,8,9}};
6. int [][]y = x;
7. System.out.println(y[2][1]);
8. }
9. }

a) 2
b) 3
c) 7
d) Compilation Error

8. What will be the output of the following Java program?

1. final class A
2. {
3. int i;
4. }
5. class B extends A
6. {
7. int j;
8. System.out.println(j + " " + i);
9. }
10. class inheritance
11. {
12. public static void main(String args[])
13. {
14. B obj = new B();
15. obj.display();
16. }
17. }

a) 2 2
b) 3 3
c) Runtime Error
d) Compilation Error

9. What will be the output of the following Java program?

1. class Abc
2. {
3. public static void main(String[]args)
4. {
5. String[] elements = { "for", "tea", "too" };
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

6. String first = (elements.length > 0) ?


elements[0]: null;
7. }
8. }

a) Compilation error
b) An exception is thrown at run time
c) The variable first is set to null
d) The variable first is set to elements[0]

10. What is Recursion in Java?


a) Recursion is a class
b) Recursion is a process of defining a method that calls other
methods repeatedly
c) Recursion is a process of defining a method that calls itself repeatedly
d) Recursion is a process of defining a method that calls other methods
which in turn call again this method
11. Which of these will happen if recursive method does not have a base case?
a) An infinite loop occurs
b) System stops the program after some time
c) After 1000000 calls it will be automatically stopped
d) None of the mentioned
12. Which of these packages contains the exception Stack Overflow in Java?
a) java.lang
b) java.util
c) java.io
d) java.system
13. What will be the output of the following Java program?

1. class recursion
2. {
3. int func (int n)
4. {
5. int result;
6. result = func (n - 1);
7. return result;
8. }
9. }
10. class Output
11. {
12. public static void main(String args[])
13. {
14. recursion obj = new recursion() ;
15. System.out.print(obj.func(12));
16. }
17. }

a) 0
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

b) 1
c) Compilation Error
What will be the output of the following Java program?

1. class recursion
2. {
3. int func (int n)
4. {
5. int result;
6. if (n == 1)
7. return 1;
8. result = func (n - 1);
9. return result;
10. }
11. }
12. class Output
13. {
14. public static void main(String args[])
15. {
16. recursion obj = new recursion() ;
17. System.out.print(obj.func(5));
18. }
19. }

a) 0
b) 1
c) 120
d) None of the mentioned

14. What will be the output of the following Java program?

1. class recursion
2. {
3. int fact(int n)
4. {
5. int result;
6. if (n == 1)
7. return 1;
8. result = fact(n - 1) * n;
9. return result;
10. }
11. }
12. class Output
13. {
14. public static void main(String args[])
15. {
16. recursion obj = new recursion() ;
17. System.out.print(obj.fact(1));
18. }
19. }
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

a) 1
b) 30
c) 120
d) Runtime Error

15. What will be the output of the following Java snippet, if attempted to
compile and run this code with command line argument “java abc Rakesh
Sharma”?

1.public class abc


2.{
3. int a=2000;
4. public static void main(String argv[])
5. {
6. System.out.println(argv[1]+" :-Please pay Rs."+a);
7. }
8.}

a) Compile time error


b) Compilation but runtime error
c) Compilation and output Rakesh :-Please pay Rs.2000
d) Compilation and output Sharma :-Please pay Rs.2000

16. What will be the output of the following Java snippet, if attempted to
compile and execute?

1.class abc
2.{
3. public static void main(String args[])
4. {
5. if(args.length>0)
6. System.out.println(args.length);
7. }
8.}

a) The snippet compiles, runs and prints 0


b) The snippet compiles, runs and prints 1
c) The snippet does not compile
d) The snippet compiles and runs but does not print anything

17. What will be the output of the following Java snippet, if compiled and
executed with command line argument “java abc 1 2 3”?

1.public class abc


2.{
3. static public void main(String [] xyz)
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

4. {
5. for(int n=1;n<xyz.length; n++)
6. {
7. System.out.println(xyz[n]+"");
8. }
9. }
10. }

a) 1 2
b) 2 3
c) 1 2 3
d) Compilation error

18. What will be the output of the following Java code snippet running with
“java demo I write java code”?

1.public class demo


2.{
3. public static void main(String args[])
4. {
5. System.out.println(args[0]+""+args[args.length-1]);
6. }
7.}

a) The snippet compiles, runs and prints “java demo”


b) The snippet compiles, runs and prints “java code”
c) The snippet compiles, runs and prints “demo code”
d) The snippet compiles, runs and prints “I code”

19. What will be the output of the following Java snippet, if compiled and
executed with command line “hello there”?

1.public class abc


2.{
3. String[] xyz;
4.
5. public static void main(String argv[])
6. {
7. xyz=argv;
8. }
9.
10. public void runMethod()
11. {
12. System.out.println(argv[1]);
13. }
14. }

a) Compile time error


b) Output would be “hello”
c) Output would be “there”
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

d) Output would be “hello there”

20. Which class allows parsing of command line arguments?


a) Args
b) JCommander
c) Command Line
d) Input
21. What is the use of @syntax?
a) Allows multiple parameters to be passed
b) Allows one to put all your options into a file and pass this file as a
parameter
c) Allows one to pass only one parameter
d) Allows one to pass one file containing only one parameter
22. Which of these is not abstract?
a) Thread
b) AbstractList
c) List
d) None of the Mentioned
23. If a class inheriting an abstract class does not define all of its function then
it will be known as?
a) Abstract
b) A simple class
c) Static class
d) None of the mentioned
24. Which of these packages contains abstract keyword?
a) java.lang
b) java.util
c) java.io
d) java.system
25. What will be the output of the following Java code?

1. class A
2. {
3. public int i;
4. private int j;
5. }
6. class B extends A
7. {
8. void display()
9. {
10. super.j = super.i + 1;
11. System.out.println(super.i + " " +
super.j);
12. }
13. }
14. class inheritance
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

15. {
16. public static void main(String args[])
17. {
18. B obj = new B();
19. obj.i=1;
20. obj.j=2;
21. obj.display();
22. }
23. }

a) 2 2
b) 3 3
c) Runtime Error
d) Compilation Error

26. What will be the output of the following Java code?

1. class A
2. {
3. public int i;
4. public int j;
5. A()
6. {
7. i = 1;
8. j = 2;
9. }
10. }
11. class B extends A
12. {
13. int a;
14. B()
15. {
16. super();
17. }
18. }
19. class super_use
20. {
21. public static void main(String args[])
22. {
23. B obj = new B();
24. System.out.println(obj.i + " " + obj.j)
25. }
26. }

a) 1 2
b) 2 1
c) Runtime Error
d) Compilation Error

27. What will be the output of the following Java code?


KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

1. class A
2. {
3. public int i;
4. protected int j;
5. }
6. class B extends A
7. {
8. int j;
9. void display()
10. {
11. super.j = 3;
12. System.out.println(i + " " + j);
13. }
14. }
15. class Output
16. {
17. public static void main(String args[])
18. {
19. B obj = new B();
20. obj.i=1;
21. obj.j=2;
22. obj.display();
23. }
24. }

a) 1 2
b) 2 1
c) 1 3
d) 3 1

28. Using which of the following, multiple inheritance in Java can be


implemented?
a) Interfaces
b) Multithreading
c) Protected methods
d) Private methods
29. All classes in Java are inherited from which class?
a) java.lang.class
b) java.class.inherited
c) java.class.object
d) java.lang.Object
30. If super class and subclass have same variable name, which keyword
should be used to use super class?
a) super
b) this
c) upper
d) classname
31. Which of the following is used for implementing inheritance through an
interface?
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

a) inherited
b) using
c) extends
d) implements
32. What would be the result if a class extends two interfaces and both have a
method with same name and signature? Lets assume that the class is not
implementing that method.
a) Runtime error
b) Compile time error
c) Code runs successfully
d) First called method is executed successfully
33. Which of these method of class String is used to extract a single character
from a String object?
a) CHARAT()
b) chatat()
c) charAt()
d) ChatAt()
34. Which of these is an incorrect statement?
a) String objects are immutable, they cannot be changed
b) String object can point to some other reference of String variable
c) StringBuffer class is used to store string in a buffer for later use
d) None of the mentioned
35. What will be the output of the following Java program?

1. class String_demo
2. {
3. public static void main(String args[])
4. {
5. char chars[] = {'a', 'b', 'c'};
6. String s = new String(chars);
7. System.out.println(s);
8. }
9. }

a) a
b) b
c) c
d) abc

36. What will be the output of the following Java program?

1. class String_demo
2. {
3. public static void main(String args[])
4. {
5. int ascii[] = { 65, 66, 67, 68};
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

6. String s = new String(ascii, 1, 3);


7. System.out.println(s);
8. }
9. }

a) ABC
b) BCD
c) CDA
d) ABCD

37. What will be the output of the following Java program?

1. class String_demo
2. {
3. public static void main(String args[])
4. {
5. char chars[] = {'a', 'b', 'c'};
6. String s = new String(chars);
7. String s1 = "abcd";
8. int len1 = s1.length();
9. int len2 = s.length();
10. System.out.println(len1 + " " + len2);
11. }
12. }

a) 3 0
b) 0 3
c) 3 4
d) 4 3

38. What will s2 contain after following lines of Java code?

StringBuffer s1 = "one";
StringBuffer s2 = s1.append("two")
a) one
b) two
c) onetwo
d) twoone

39. Which of this method of class StringBuffer is used to get the length of the
sequence of characters?
a) length()
b) capacity()
c) Length()
d) Capacity()
KCG COLLEGE OF TECHNOLOGY
DEPARTMENT OF CSE & IT
CS8392:OBJECT ORIENTED PROGRAMMING

40. What will be the output of the following Java code?

1. class output
2. {
3. public static void main(String args[])
4. {
5. StringBuffer c = new StringBuffer("Hello");
6. System.out.println(c.length());
7. }
8. }

a) 4
b) 5
c) 6
d) 7

You might also like