JAVA MCQ Questions and Answers in Hindi
Hello friends in this article you can find your query related to Advanced JAVA MCQ Questions and Answers in Hindi, Advanced Java MCQ Questions with Answers pdf, Java Interview Questions and Answers pdf, Core Java MCQ Questions and Answers pdf, JAVA MCQ pdf download
JAVA MCQ Questions for placement, Java questions and answers mcq, Java questions and answers, JAVA Programming MCQ Questions and Answers, JAVA Interview MCQ Questions, JAVA MCQ Questions and Answers in Hindi pdf download
Java MCQ Questions with Answers pdf
Java Interview Questions and Answers pdf, Core JAVA MCQ Questions and Answers in Hindi, JAVA MCQ pdf download
1. JDK stands for _______.
JDK рдХрд╛ рдорддрд▓рдм________ рд╣реИред
A) JavaScript deployment kit
B) Java deployment kit
C) Java development kit
D) None of these
2. Which of the follwing below live on the heap in java?
рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рдЬрд╛рд╡рд╛ рдореЗрдВ рд╣реАрдк рдкрд░ рд░рд╣рддрд╛ рд╣реИ?
A) Method
B) Instance variable
C) Class
D) Object
3. JRE stands for________.
JRE рдХрд╛ рдорддрд▓рдм _______ рд╣реИред
A) Java Runtime Environment
B) JDK runtime Environment
C) Java run ecosystem
D) None of these
4. Which of the following interface is used to declare core methods in java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдХреЛрд░ рдореЗрдердб рдШреЛрд╖рд┐рдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХрд┐рд╕ рдЗрдВрдЯрд░рдлрд╝реЗрд╕ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) Collection
B) EventListner
C) Set
D) Comparator
5. What makes the Java platform independent?
рдЬрд╛рд╡рд╛ рдкреНрд▓реЗрдЯрдлреЙрд░реНрдо рдХреЛ рдХреНрдпрд╛ рд╕реНрд╡рддрдВрддреНрд░ рдмрдирд╛рддрд╛ рд╣реИ?
A) Class compilation
B) It uses bytecode for execution
C) Advanced programming language
D) All of these
6. Which of these interface handle sequences?
рдЗрдирдореЗрдВ рд╕реЗ рдХреМрди рд╕рд╛ рдЗрдВрдЯрд░рдлрд╝реЗрд╕ рдЕрдиреБрдХреНрд░рдореЛрдВ рдХреЛ рд╕рдВрднрд╛рд▓рддрд╛ рд╣реИ?
A) Comparator
B) List
C) Set
D) Collection
7. What are the types of memory allocated in memory in java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдореЗрдореЛрд░реА рдореЗрдВ рдЖрд╡рдВрдЯрд┐рдд рдореЗрдореЛрд░реА рдХреЗ рдкреНрд░рдХрд╛рд░ рдХреНрдпрд╛ рд╣реИрдВ?
A) Stack memory
B) Heap memory
C) Both A and B
D) None of these
8. Which of this interface must contain a unique element?
рдЗрдирдореЗрдВ рд╕реЗ рдХрд┐рд╕ рдЗрдВрдЯрд░рдлрд╝реЗрд╕ рдореЗрдВ рдПрдХ рдЕрджреНрд╡рд┐рддреАрдп рддрддреНрд╡ рд╣реЛрдирд╛ рдЪрд╛рд╣рд┐рдП?
A) Array
B) List
C) Set
D) Collection
9. Multiline comment is created using ________.
рдорд▓реНрдЯреАрд▓рд╛рдЗрди рдХрдореЗрдВрдЯ ________ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдХреЗ рдмрдирд╛рдпрд╛ рдЬрд╛рддрд╛ рд╣реИред
A) <!– — >
B) /* */
C) //
D) All of these
10. Which of the following declarations does not compile?
рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рд╕реА рдШреЛрд╖рдгрд╛ рд╕рдВрдХрд▓рд┐рдд рдирд╣реАрдВ рд╣реИ?
A) int num1, num2 = 0;
B) int num1, num2;
C) double num1, int num2 = 0;
D) int num1 = 0, num2 = 0;
JAVA MCQ Questions and Answers in Hindi pdf
11. What is the entry point of a program in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдкреНрд░реЛрдЧреНрд░рд╛рдо рдХрд╛ рдкреНрд░рд╡реЗрд╢ рдмрд┐рдВрджреБ рдХреНрдпрд╛ рд╣реИ?
A) Last line of code
B) The first line of code
C) main() method
D) main class
12. Which keyword in java is used for exception handling?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдХреМрди рд╕рд╛ рдХреАрд╡рд░реНрдб рдПрдХреНрд╕реЗрдкреНрд╢рди рд╣реИрдВрдбрд▓рд┐рдВрдЧ рдХреЗ рд▓рд┐рдП рдкреНрд░рдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) throw
B) excepHand
C) exep
D) All of these
13. Which statement about a valid .java file is true?
A) It must define at least one public class
B) It can contain one public class declaration and one public interface definition
C) It can only contain one class declaration
D) It may define at most one public class
14. Which class in Java is used to take input from the user?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдХрд┐рд╕ рд╡рд░реНрдЧ рдХрд╛ рдкреНрд░рдпреЛрдЧ рдпреВрдЬрд░ рд╕реЗ рдЗрдирдкреБрдЯ рд▓реЗрдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) Applier
B) Input
C) Scanner
D) None of these
15. Which is correct about an instance variable of type String?
рд╕реНрдЯреНрд░рд┐рдВрдЧ рдкреНрд░рдХрд╛рд░ рдХреЗ рдЖрд╡реГрддреНрддрд┐ рдЪрд░ рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рдХреМрди рд╕рд╛ рд╕рд╣реА рд╣реИ?
A) It does not have a default value
B) It defaults to null
C) It defaults to an empty string
D) It will not compile without initializing on the declaration line
16. Method used to take a string as input in Java?
рд╡рд┐рдзрд┐ рдЬрд╛рд╡рд╛ рдореЗрдВ рдЗрдирдкреБрдЯ рдХреЗ рд░реВрдк рдореЗрдВ рдПрдХ рд╕реНрдЯреНрд░рд┐рдВрдЧ рд▓реЗрдиреЗ рдХреЗ рд▓рд┐рдП рдкреНрд░рдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) nextLine()
B) next()
C) Both A) and B)
D) None of these
17. Which of the following does not compile?
рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рд╕рдВрдХрд▓рд┐рдд рдирд╣реАрдВ рдХрд░рддрд╛ рд╣реИ?
A) int num = _9_99;
B) int num = 9_9_9;
C) int num = 999;
D) None of the above;
18. Which of the following is the correct syntax to create a variable in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рд╡реЗрд░рд┐рдПрдмрд▓ рдмрдирд╛рдиреЗ рдХреЗ рд▓рд┐рдП рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рд╕рд╛ рд╕рд┐рдВрдЯреИрдХреНрд╕ рд╕рд╣реА рд╣реИ?
A) var name int;
B) int name;
C) var name;
D) All of these
19. Which of these is a type of variable in Java?
рдЗрдирдореЗрдВ рд╕реЗ рдХреМрди рдЬрд╛рд╡рд╛ рдореЗрдВ рдПрдХ рдкреНрд░рдХрд╛рд░ рдХрд╛ рд╡реЗрд░рд┐рдПрдмрд▓ рд╣реИ?
A) Static Variable
B) Local Variable
C) Instance Variable
D) All of these
20. What is type casting in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдЯрд╛рдЗрдк рдХрд╛рд╕реНрдЯрд┐рдВрдЧ рдХреНрдпрд╛ рд╣реИ?
A) Creating a new variable
B) Casting variable to the class
C) It is converting type of a variable from one type to another
D) All of these
Java MCQ Questions with Answers pdf
21. What is true of the finalize() method?
finalize() рд╡рд┐рдзрд┐ рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рдХреНрдпрд╛ рд╕рдЪ рд╣реИ?
A) It will be called exactly once
B) It may be called zero or more times
C) It may be called zero or one times
D) It may be called one or more times
22. Which type of casting is lossy in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдХрд┐рд╕ рдкреНрд░рдХрд╛рд░ рдХреА рдХрд╛рд╕реНрдЯрд┐рдВрдЧ рд╣рд╛рдирд┐рдкреВрд░реНрдг рд╣реИ?
A) Manual typecasting
B) Narrowing typecasting
C) Widening typecasting
D) All of the above
23. Which of the following is true about primitives?
primitives рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рд╕рд╛ рд╕рддреНрдп рд╣реИ?
A) You can convert a wrapper class object to a primitive by calling valueOf()
B) You can convert a primitive to a wrapper class object simply by assigning it
C) You can call methods on a primitive
D) You can store a primitive directly into an ArrayList
24. Which of the following can be declared as final in java?
рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХрд┐рд╕реЗ рдЬрд╛рд╡рд╛ рдореЗрдВ рдлрд╛рдЗрдирд▓ рдШреЛрд╖рд┐рдд рдХрд┐рдпрд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИ?
A) Variable
B) Method
C) Class
D) All of these
25. How do you force garbage collection to occur at a certain point?
рдЖрдк рдПрдХ рдирд┐рд╢реНрдЪрд┐рдд рдмрд┐рдВрджреБ рдкрд░ рдХрдЪрд░рд╛ рд╕рдВрдЧреНрд░рд╣рдг рдХреИрд╕реЗ рдХрд░рддреЗ рд╣реИрдВ?
A) Call System.forceGc()
B) Call System.gc()
C) Call System.requireGc()
D) None of the above
26. Finally block is attached to?
рдЕрдВрдд рдореЗрдВ рдмреНрд▓реЙрдХ рдХрд┐рд╕рд╕реЗ рдЬреБрдбрд╝рд╛ рд╣реИ?
A) Method block
B) Class block
C) Try-catch block
D) All of these
27. Which Java keyword is used to access features of a package?
рдкреИрдХреЗрдЬ рдХреА рд╕реБрд╡рд┐рдзрд╛рдУрдВ рддрдХ рдкрд╣реБрдБрдЪрдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рдЬрд╛рд╡рд╛ рдХреАрд╡рд░реНрдб рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) extends
B) import
C) get
D) All of these
28. The break statement in Java is used to _________.
рдЬрд╛рд╡рд╛ рдореЗрдВ рдмреНрд░реЗрдХ рд╕реНрдЯреЗрдЯрдореЗрдВрдЯ рдХрд╛ рдЙрдкрдпреЛрдЧ ___ рдХреЗ рд▓рд┐рдП рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИред
A) Skips the current iteration
B) Terminates from the program immediately
C) Terminates from the loop immediately
D) All of these
29. Can the Java program accept input from the command line?
рдХреНрдпрд╛ рдЬрд╛рд╡рд╛ рдкреНрд░реЛрдЧреНрд░рд╛рдо рдХрдорд╛рдВрдб рд▓рд╛рдЗрди рд╕реЗ рдЗрдирдкреБрдЯ рд╕реНрд╡реАрдХрд╛рд░ рдХрд░ рд╕рдХрддрд╛ рд╣реИ?
A) Yes, by access command prompt
B) Yes, using command-line arguments
C) No
D) None of these
30. Which of these is the correct method to create an array in java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдРрд░реЗ рдмрдирд╛рдиреЗ рдХреА рд╕рд╣реА рд╡рд┐рдзрд┐ рдЗрдирдореЗрдВ рд╕реЗ рдХреМрди рд╕реА рд╣реИ?
A) int arr[] = {1, 4, 6};
B) arr = new int[] {3, 1, 8};
C) int[] arr = {1, 3, 5};
D) All of these
Java Interview Questions and Answers pdf
31. Which method in java is used to get the name of running java VM?
рдЬрд╛рд╡рд╛ VM рдЪрд▓рд╛рдиреЗ рдХрд╛ рдирд╛рдо рдкреНрд░рд╛рдкреНрдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдЬрд╛рд╡рд╛ рдореЗрдВ рдХрд┐рд╕ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) Sytem.getVmName
B) System.vmName
C) System.getProperties(“java.vm.name”)
D) System.getProperties(“vm.name”)
32. Object in java are _________.
рдЬрд╛рд╡рд╛ рдореЗрдВ рдСрдмреНрдЬреЗрдХреНрдЯ _________ рд╣реЛрддреЗ рд╣реИрдВред
A) Iterators
B) References
C) Classes
D) None of these
33. Static variables in java are declared as ______.
рдЬрд╛рд╡рд╛ рдореЗрдВ рд╕реНрдЯреЗрдЯрд┐рдХ рд╡реЗрд░рд┐рдПрдмрд▓реНрд╕ рдХреЛ ___ рдШреЛрд╖рд┐рдд рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИред
A) Constants
B) new variables
C) final variables
D) All of these
34. Which Java method is used to add all of the specified elements to the specified collection?
рдирд┐рд░реНрджрд┐рд╖реНрдЯ рд╕рдВрдЧреНрд░рд╣ рдореЗрдВ рд╕рднреА рдирд┐рд░реНрджрд┐рд╖реНрдЯ рддрддреНрд╡реЛрдВ рдХреЛ рдЬреЛрдбрд╝рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рдЬрд╛рд╡рд╛ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) cpy()
B) copy()
C) addValue()
D) addAll()
35. BigInteger Class is used to _______.
BigInteger Class рдХрд╛ рдЙрдкрдпреЛрдЧ _______ рдХреЗ рд▓рд┐рдП рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИред
A) A class that stores large range of integer
B) Store integer values
C) Store very long range of number
D) All of these
36. The ‘super’ keyword is used to _______.
‘рд╕реБрдкрд░’ рдХреАрд╡рд░реНрдб рдХрд╛ рдЙрдкрдпреЛрдЧ _______ рдХреЗ рд▓рд┐рдП рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИред
A) Access instance of child class
B) Access instance of the same class
C) Access instance of the parent class
D) Access instance of friend class
37. What is a map in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдирдХреНрд╢рд╛ рдХреНрдпрд╛ рд╣реИ?
A) Represented using key-value pairs
B) Defined in java.util package
C) Data structure
D) All of the above
38. The super() method is used to _______.
рд╕реБрдкрд░ () рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ _____ рдХреЗ рд▓рд┐рдП рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИред
A) Call constructor of the parent class
B) Is a declared method
C) Call constructor of friend class
D) Call constructor
39. Boxing is _______.
рдмреЙрдХреНрд╕рд┐рдВрдЧ _______ рд╣реИред
A) Converting primitive type of object instance
B) Creating object
C) Creating new box
D) All of the above
40. Which of the following methods is used to extract the length of a string in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдПрдХ рд╕реНрдЯреНрд░рд┐рдВрдЧ рдХреА рд▓рдВрдмрд╛рдИ рдирд┐рдХрд╛рд▓рдиреЗ рдХреЗ рд▓рд┐рдП рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХрд┐рд╕ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) sizeof()
B) len()
C) length()
D) size()
JAVA MCQ Questions and Answers in Hindi pdf
41. Abstract class is _______.
Abstract рд╡рд░реНрдЧ _______ рд╣реИред
A) Needs to be inherited to be used
B) Contains only abstract method
C) Created using abstract keyword
D) All of the above
42. How can we access methods for file handling in java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдлрд╛рдЗрд▓ рд╣реИрдВрдбрд▓рд┐рдВрдЧ рдХреЗ рд▓рд┐рдП рд╣рдо рд╡рд┐рдзрд┐рдпреЛрдВ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХреИрд╕реЗ рдХрд░ рд╕рдХрддреЗ рд╣реИрдВ?
A) Java.io.File
B) Java.io
C) Java.files
D) Java.FileHandling
43. Which of these is a property of threads in Java?
рдЗрдирдореЗрдВ рд╕реЗ рдХреМрди рдЬрд╛рд╡рд╛ рдореЗрдВ рдереНрд░реЗрдбреНрд╕ рдХрд╛ рдЧреБрдг рд╣реИ?
A) Has its own priority
B) Multiple threads can be executed concurrently
C) Both A) and B)
D) None of these
44. Which is the correct absolute path of a file in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдлрд╝рд╛рдЗрд▓ рдХрд╛ рд╕рд╣реА рдкреВрд░реНрдг рдкрде рдХреМрди рд╕рд╛ рд╣реИ?
A) C:\Program Files\Java\jdk1.8.0_131\file_name.txt
B) C:\Program Files\Java\file_name.txt
C) C:\Program Files\Java\jdk1.8.0_131\bin\file_name.txt
D) C:\Program Files\Java\jdk1.8.0_131\bin\File Handling\file_name.txt
45. Which method deletes a file in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдХреМрди рд╕реА рд╡рд┐рдзрд┐ рдлрд╝рд╛рдЗрд▓ рдХреЛ рд╣рдЯрд╛рддреА рд╣реИ?
A) file.garbage()
B) file.remove()
C) file.delete()
D) file.dump()
46. What is boolean in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдмреВрд▓рд┐рдпрди рдХреНрдпрд╛ рд╣реИ?
A) Truthy value in java
B) A value consisting of 8 values
C) A value consisting of only true and false value
D) All of the above
47. Which method in java is used to read lines from file?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдлрд╛рдЗрд▓ рд╕реЗ рд▓рд╛рдЗрди рдкрдврд╝рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) file.getLine()
B) file.nextLine()
C) file.read()
D) All of these
48. Which is/are valid method(s) of math library in java?
рдЬрд╛рд╡рд╛ рдореЗрдВ math library рдХреА рд╡реИрдз рд╡рд┐рдзрд┐ рдХреМрди рд╕реА рд╣реИ/рд╣реИрдВ?
A) log10()
B) cbrt()
C) max()
D) All of these
49. In java, recursion is _______.
рдЬрд╛рд╡рд╛ рдореЗрдВ, рд░рд┐рдХрд░реНрд╕рди _______ рд╣реИред
A) The process to call methods
B) A process allowing methods to call itself
C) Method
D) None of these
50. The ‘implements’ keyword is used to _______.
‘рдЗрдореНрдкреНрд▓реАрдореЗрдВрдЯреНрд╕’ рдХреАрд╡рд░реНрдб рдХрд╛ рдЙрдкрдпреЛрдЧ _____ рдХреЗ рд▓рд┐рдП рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИред
A) Inherit a class in java
B) Inherit an interface in Java
C) Implement the function of a class
D) All of the above
Also Read: Java Interview Questions and Answers pdf
51. What is stringBuffer in java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рд╕реНрдЯреНрд░рд┐рдВрдЧрдмрдлрд░ рдХреНрдпрд╛ рд╣реИ?
A) Class to create a string from i/o buffer
B) Class to create a mutable string in java
C) Class to create a string array
D) All of the above
52. Which syntax is valid to create a vector in java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рд╡реЗрдХреНрдЯрд░ рдмрдирд╛рдиреЗ рдХреЗ рд▓рд┐рдП рдХреМрди рд╕рд╛ рд╕рд┐рдВрдЯреИрдХреНрд╕ рдорд╛рдиреНрдп рд╣реИ?
A) int name = new vector ()
B) Vector name = new string;
C) Vector < string > names = new Vector < String > ();
D) All of the above
53. Which of these is true for interfaces in java?
рдЗрдирдореЗрдВ рд╕реЗ рдХреМрди рдЬрд╛рд╡рд╛ рдореЗрдВ рдЗрдВрдЯрд░рдлреЗрд╕ рдХреЗ рд▓рд┐рдП рд╕рд╣реА рд╣реИ?
A) It does not contain constructors
B) All the methods of an interface are abstract
C) The keyword interface is used to create a method
D) All of the above
54. Which statement is correct for private member in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдкреНрд░рд╛рдЗрд╡реЗрдЯ рдореЗрдВрдмрд░ рдХреЗ рд▓рд┐рдП рдХреМрди рд╕рд╛ рд╕реНрдЯреЗрдЯрдореЗрдВрдЯ рд╕рд╣реА рд╣реИ?
A) Declared using private keyword
B) Any class can access
C) Access outside the class is allowed
D) All of the above
55. Encapsulation is _______.
рдПрдирдХреИрдкреНрд╕реБрд▓реЗрд╢рди _______ рд╣реИред
A) Creating special data structure
B) Creating special methods
C) Wrapping up of data and related functions into a single entity
D) All of the above
56. What is a comparator in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдПрдХ рддреБрд▓рдирд┐рддреНрд░ рдХреНрдпрд╛ рд╣реИ?
A) Interface to compare two objects in java
B) Comparison method for lists
C) Interface to compare integer
D) All of the above
57. Batch processing in java is ______.
рдЬрд╛рд╡рд╛ рдореЗрдВ рдмреИрдЪ рдкреНрд░реЛрд╕реЗрд╕рд┐рдВрдЧ _______ рд╣реИред
A) Used to increase program’s performance
B) Used to processing multiple queries can be executed at once
C) Used to execute a group of queries or a batch as executing a single query, again and again, is time taking and reduce the performance
D) All of the above
58. Which of the following methods are present in comparator interface?
рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рд╕реА рд╡рд┐рдзрд┐ рддреБрд▓рдирд┐рддреНрд░ рдЗрдВрдЯрд░рдлрд╝реЗрд╕ рдореЗрдВ рдореМрдЬреВрдж рд╣реИ?
A) isEqual()
B) equate()
C) compare()
D) All of these
59. What is a deadlock in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдЧрддрд┐рд░реЛрдз рдХреНрдпрд╛ рд╣реИ?
A) State when threads are not ready
B) State when threads are in hold state forever
C) State when all processes have complete working and are dead
D) All of the above
60. Which of the following statements is not correct for vectors in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рд╡реИрдХреНрдЯрд░ рдХреЗ рд▓рд┐рдП рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рд╕рд╛ рдХрдерди рд╕рд╣реА рдирд╣реАрдВ рд╣реИ?
A) It is asynchronous
B) It can store an object of different classes
C) It was created using vector keyword
D) None of the above
Java MCQ Questions with Answers pdf
61. Which graph is used to check for deadlock in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдЧрддрд┐рд░реЛрдз рдХреА рдЬрд╛рдВрдЪ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рдЧреНрд░рд╛рдл рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) Wait-for-graph
B) Time graph
C) Deadlock graph
D) None of these
62. Null in Java is _______.
рдЬрд╛рд╡рд╛ рдореЗрдВ Null _______ рд╣реИред
A) Used in exception handling
B) Literal value
C) Reserved keyword
D) All of these
63. Which Java method is used to convert an object to string?
рдХрд┐рд╕реА рдСрдмреНрдЬреЗрдХреНрдЯ рдХреЛ рд╕реНрдЯреНрд░рд┐рдВрдЧ рдореЗрдВ рдмрджрд▓рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рдЬрд╛рд╡рд╛ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) object.string()
B) toString()
C) createString()
D) newString()
64. Enumeration in Java is ______.
рдЬрд╛рд╡рд╛ рдореЗрдВ рдПрдиреНрдпреВрдорд░реЗрд╢рди ______ рд╣реИред
A) Class
B) Method
C) Data type which contains fixed set of constants
D) None of these
65. Which of the following ways is the correct way to create an object in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдСрдмреНрдЬреЗрдХреНрдЯ рдмрдирд╛рдиреЗ рдХрд╛ рд╕рд╣реА рддрд░реАрдХрд╛ рдирд┐рдореНрди рдореЗрдВ рд╕реЗ рдХреМрди рд╕рд╛ рддрд░реАрдХрд╛ рд╣реИ?
A) clone() method
B) Using newInstance() method
C) Using the new keyword
D) All of these
66. Which keyword is used to inherit classes in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдХрдХреНрд╖рд╛рдУрдВ рдХреЛ рдЗрдирд╣реЗрд░рд┐рдЯ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рдХреАрд╡рд░реНрдб рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) isChild
B) inheritance
C) extends
D) None of these
67. Which of the following is a valid data structure in java?
рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХреМрди рдЬрд╛рд╡рд╛ рдореЗрдВ рдПрдХ рд╡реИрдз рдбреЗрдЯрд╛ рд╕рдВрд░рдЪрдирд╛ рд╣реИ?
A) Vector
B) List
C) Array
D) All of these
68. Which of the following inheritance of class is invalid in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдирд┐рдореНрди рдореЗрдВ рд╕реЗ рдХреМрди-рд╕рд╛ рд╡рд░реНрдЧ рдХрд╛ рд╡рдВрд╢рд╛рдиреБрдХреНрд░рдо рдЕрдорд╛рдиреНрдп рд╣реИ?
A) Multi-level
B) Multiple
C) Single
D) Hierarchical
69. What is polymorphism in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдмрд╣реБрд░реВрдкрддрд╛ рдХреНрдпрд╛ рд╣реИ?
A) Creating a new class for each task
B) Performing multiple tasks using multiple methods
C) Performing a single task in multiple ways
D) All of the above
70. Which method in java is used to generate random numbers in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдпрд╛рджреГрдЪреНрдЫрд┐рдХ рд╕рдВрдЦреНрдпрд╛ рдЙрддреНрдкрдиреНрди рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдЬрд╛рд╡рд╛ рдореЗрдВ рдХрд┐рд╕ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) rand()
B) random()
C) random.nextInt()
D) All of these
Java Interview Questions and Answers pdf
71. What are packages in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдкреИрдХреЗрдЬ рдХреНрдпрд╛ рд╣реИрдВ?
A) Way to encapsulate a group of classes, sub-packages, and interface
B) Methods of the main class
C) Methods of a friend class
D) All of the above
72. Which of these is a non-access modifier?
рдЗрдирдореЗрдВ рд╕реЗ рдХреМрди рдПрдХ рдиреЙрди-рдПрдХреНрд╕реЗрд╕ рдореЙрдбрд┐рдлрд╛рдпрд░ рд╣реИ?
A) native
B) private
C) public
D) All of these
73. The correct syntax to import the math library in java is ______.
рдЬрд╛рд╡рд╛ рдореЗрдВ рдЧрдгрд┐рдд рдкреБрд╕реНрддрдХрд╛рд▓рдп рдЖрдпрд╛рдд рдХрд░рдиреЗ рдХрд╛ рд╕рд╣реА рд╕рд┐рдВрдЯреИрдХреНрд╕ ______ рд╣реИред
A) import java.math
B) import math
C) import java.lang.math
D) All of these
74. When a finally block executed in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдЕрдВрдд рдореЗрдВ рдмреНрд▓реЙрдХ рдХрдм рдирд┐рд╖реНрдкрд╛рджрд┐рдд рдХрд┐рдпрд╛ рдЧрдпрд╛?
A) Executed at last
B) Exception has occurred
C) Try block is executed without any exception
D) None of these
75. Which of these is not a valid Boolean method in Java?
рдЗрдирдореЗрдВ рд╕реЗ рдХреМрди рдЬрд╛рд╡рд╛ рдореЗрдВ рдорд╛рдиреНрдп рдмреВрд▓рд┐рдпрди рд╡рд┐рдзрд┐ рдирд╣реАрдВ рд╣реИ?
A) toString() method
B) hashCode() method
C) equals() method
D) All of these
76. Which method is used to add a new line to file in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдлрд╛рдЗрд▓ рдореЗрдВ рдирдИ рд▓рд╛рдЗрди рдЬреЛрдбрд╝рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) file.write()
B) file.nextLine()
C) file.addLine()
D) file.line()
77. Which method in Java is used to check for NaN values?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдХрд┐рд╕ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ NaN рдорд╛рдиреЛрдВ рдХреА рдЬрд╛рдВрдЪ рдХреЗ рд▓рд┐рдП рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) isNotNan()
B) checkNan()
C) isNan()
D) All of these
78. Which thread is executed in the background?
рдкреГрд╖реНрдарднреВрдорд┐ рдореЗрдВ рдХреМрди рд╕рд╛ рдереНрд░реЗрдб рдирд┐рд╖реНрдкрд╛рджрд┐рдд рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) Daemon thread
B) User-created thread
C) New thread
D) All of these
79. What is file handling in java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдлрд╛рдЗрд▓ рд╣реИрдВрдбрд▓рд┐рдВрдЧ рдХреНрдпрд╛ рд╣реИ?
A) Filing method to different file to extract them better
B) Creating new method
C) It is creating, deleting, and modifying files using a java program
D) All of the above
80. Multithreading in java is _______.
рдЬрд╛рд╡рд╛ рдореЗрдВ рдорд▓реНрдЯреАрдереНрд░реЗрдбрд┐рдВрдЧ _______ рд╣реИред
A) Blocking threads
B) Creating more threads at a time
C) Executing multiple processes simultaneously
D) All of the above
JAVA MCQ Questions and Answers in Hindi pdf
81. Which method is used to convert radians to degree in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рд░реЗрдбрд┐рдпрди рдХреЛ рдбрд┐рдЧреНрд░реА рдореЗрдВ рдмрджрд▓рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) degree()
B) toDegrees()
C) convertRadtoDeg()
D) All of these
82. The trim() method in Java used to ______.
рдЬрд╛рд╡рд╛ рдореЗрдВ рдЯреНрд░рд┐рдо () рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ _____ рдХреЗ рд▓рд┐рдП рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИред
A) Remove leading and trailing spaces
B) Remove the values after the given index
C) Remove the given character
D) None of these
83. Wrapper class in java is ______.
рдЬрд╛рд╡рд╛ рдореЗрдВ Wrapper рд╡рд░реНрдЧ _________ рд╣реИред
A) Create a new instance of the class
B) Declare new classes called wrapper
C) Used to encapsulate primitive data types
D) None of these
84. What are regexes in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рд░реЗрдЧреЗрдХреНрд╕ рдХреНрдпрд╛ рд╣реИрдВ?
A) Array to create a new integer
B) String
C) API to define a pattern for searching strings
D) Wrapper class
85. What is a set in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдПрдХ рд╕реЗрдЯ рдХреНрдпрд╛ рд╣реИ?
A) Primary structures
B) Used to store key-value pairs
C) Represented in the form of values
D) All of the above
86. Which of the following sorts the elements were inserted?
рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХрд┐рд╕ рдкреНрд░рдХрд╛рд░ рдХреЗ рддрддреНрд╡реЛрдВ рдХреЛ рд╕рдореНрдорд┐рд▓рд┐рдд рдХрд┐рдпрд╛ рдЧрдпрд╛ рдерд╛?
A) Array
B) Map
C) Hashtable
D) None of these
87. ‘this’ keyword in java is ________.
рдЬрд╛рд╡рд╛ рдореЗрдВ ‘this’ рдХреАрд╡рд░реНрдб ___ рд╣реИред
A) Used to create a new instance
B) Holds object value
C) Used to hold the reference of the current object
D) All of the above
88. Which Java method is used to clear element of ArrayList?
ArrayList рдХреЗ рдПрд▓реАрдореЗрдВрдЯ рдХреЛ рдХреНрд▓рд┐рдпрд░ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рдЬрд╛рд╡рд╛ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) clearAll()
B) delete()
C) deleteAll()
D) clear()
89. Which Java method is used to detect the OS in which Java program is being run?
OS рдХрд╛ рдкрддрд╛ рд▓рдЧрд╛рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рдЬрд╛рд╡рд╛ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ рдЬрд┐рд╕рдореЗрдВ рдЬрд╛рд╡рд╛ рдкреНрд░реЛрдЧреНрд░рд╛рдо рдЪрд▓рд╛рдпрд╛ рдЬрд╛ рд░рд╣рд╛ рд╣реИ?
A) system.getProperties(“os.name”)
B) system.get(os.name)
C) system.getOSdetails()
D) system.getProperties(“os”)
90. What is garbage collection in java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдХрдЪрд░рд╛ рд╕рдВрдЧреНрд░рд╣рдг рдХреНрдпрд╛ рд╣реИ?
A) Delete all values
B) Create new garbage values
C) Method to manage memory in java
D) All of the above
Java MCQ Questions with Answers pdf
91. What is the default encoding of OutstreamWriter?
OutstreamWriter рдХрд╛ рдбрд┐рдлрд╝реЙрд▓реНрдЯ рдПрдиреНрдХреЛрдбрд┐рдВрдЧ рдХреНрдпрд╛ рд╣реИ?
A) UTF-12
B) UTF-16
C) UTF-32
D) Based on the host platform
92. Which Java method is used to get the version of running java VM?
рдЬрд╛рд╡рд╛ рд╡реАрдПрдо рдЪрд▓рд╛рдиреЗ рдХрд╛ рд╕рдВрд╕реНрдХрд░рдг рдкреНрд░рд╛рдкреНрдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐рд╕ рдЬрд╛рд╡рд╛ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ?
A) System.getProperties(“java.vm.version”)
B) System.getProperties(“vm.version”)
C) System.vm.version
D) System.getVmVersion
93. Array in java is _________.
рдЬрд╛рд╡рд╛ рдореЗрдВ рдРрд░реЗ _______ рд╣реИред
A) The data type of consisting of characters
B) Collection of elements of different types
C) Collection of similar elements
D) None of these
94. What is the full form of AWT?
AWT рдХрд╛ рдлреБрд▓ рдлреЙрд░реНрдо рдХреНрдпрд╛ рд╣реИ?
A) Absolute wear kit
B) Abstract window toolKit
C) Absolute window toolKit
D) Abstract window tools
95. Jar in java stands for ______.
рдЬрд╛рд╡рд╛ рдореЗрдВ рдЬрд╛рд░ рдХрд╛ рдЕрд░реНрде ______ рд╣реИред
A) Java application runner
B) Java application runtime
C) Java ARchive
D) None of these
96. The result of dividing by 0 in Java is ______.
рдЬрд╛рд╡рд╛ рдореЗрдВ 0 рд╕реЗ рднрд╛рдЧ рджреЗрдиреЗ рдХрд╛ рдкрд░рд┐рдгрд╛рдо ______ рд╣реЛрддрд╛ рд╣реИред
A) Infinite
B) Expectation
C) Error
D) None of these
97. Can we pass objects to method arguments in Java?
рдХреНрдпрд╛ рд╣рдо рдЬрд╛рд╡рд╛ рдореЗрдВ рд╡рд┐рдзрд┐ рддрд░реНрдХреЛрдВ рдХреЗ рд▓рд┐рдП рдСрдмреНрдЬреЗрдХреНрдЯ рдкрд╛рд╕ рдХрд░ рд╕рдХрддреЗ рд╣реИрдВ?
A) Yes
B) No
98. Can we write a program without a main method in Java?
рдХреНрдпрд╛ рд╣рдо рдЬрд╛рд╡рд╛ рдореЗрдВ рдореБрдЦреНрдп рд╡рд┐рдзрд┐ рдХреЗ рдмрд┐рдирд╛ рдкреНрд░реЛрдЧреНрд░рд╛рдо рд▓рд┐рдЦ рд╕рдХрддреЗ рд╣реИрдВ?
A) Yes
B) No
99. Can we keep a different name for the java class name and java file name?
рдХреНрдпрд╛ рд╣рдо рдЬрд╛рд╡рд╛ рд╡рд░реНрдЧ рдХреЗ рдирд╛рдо рдФрд░ рдЬрд╛рд╡рд╛ рдлрд╝рд╛рдЗрд▓ рдирд╛рдо рдХреЗ рд▓рд┐рдП рдПрдХ рдЕрд▓рдЧ рдирд╛рдо рд░рдЦ рд╕рдХрддреЗ рд╣реИрдВ?
A) Yes
B) No
100. Can the main() method be overloaded in Java?
рдЬрд╛рд╡рд╛ рдореЗрдВ рдореБрдЦреНрдп () рд╡рд┐рдзрд┐ рдХреЛ рдУрд╡рд░рд▓реЛрдб рдХрд┐рдпрд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИ?
A) Yes
B) No
So friends I hope you enjoy this article related to Advanced Java MCQ Questions with Answers pdf, Advanced JAVA MCQ Questions and Answers in Hindi, Java Interview Questions and Answers pdf, JAVA MCQ pdf download, Core Java MCQ Questions and Answers pdf
Java Interview Questions and Answers pdf
File Name | Java MCQ Questions and Answers in Hindi |
File Size | 698 KB |
No. of Pages | 14 |
Language | Hindi & English |
Download | Click Here |
Related Searches: Java questions and answers mcq, JAVA MCQ Questions for placement, JAVA Interview MCQ Questions, JAVA Programming MCQ Questions and Answers, Java Interview Questions and Answers pdf, Core JAVA MCQ Questions and Answers in Hindi pdf download, JAVA MCQ pdf download