Core Java MCQ Questions and Answers pdf
Dear aspirant in this article you can find your query related to Core Java MCQ Questions and Answers pdf, Java Interview Questions and Answers pdf, Java Programming Questions and Answers pdf, java coding questions and answers pdf
Java mcq questions and answers pdf free download, java interview questions mcq, java mcq questions with answers pdf, java viva questions and answers pdf, java programming question paper pdf, java questions and answers pdf
Java Interview Questions and Answers pdf
Java programming mcq questions and answers pdf, Java Programming Questions and Answers pdf, Java Interview Questions and Answers pdf, Core Java MCQ Questions and Answers pdf
Java Programming Questions and Answers pdf
1. Which one of these lists contains only Java programming language keywords?
इनमें से किस सूची में केवल जावा प्रोग्रामिंग भाषा के कीवर्ड हैं?
A. try, virtual, throw, final, volatile, transient
B. goto, instanceof, native, finally, default, throws
C. class, if, void, long, Int, continue
D. strictfp, constant, super, implements, do
2. Which is a reserved word in the Java programming language?
जावा प्रोग्रामिंग भाषा में आरक्षित शब्द कौन सा है?
A. array
B. native
C. method
D. reference
3. Which will legally declare, construct, and initialize an array?
कौन सा कानूनी रूप से एक सरणी घोषित, निर्माण और प्रारंभ करेगा?
A. int myList [] [] = {4,9,7,0};
B. int [] myList = (5, 8, 2);
C. int [] myList = {“1”, “2”, “3”};
D. int myList [] = {4, 3, 7};
4. Which is a valid keyword in java?
जावा में मान्य कीवर्ड कौन सा है?
A. interface
B. unsigned
C. Float
D. string
5. Which is the valid declaration within an interface definition?
इंटरफ़ेस परिभाषा के भीतर वैध घोषणा कौन सी है?
A. public double methoda();
B. protected void methoda(double d1);
C. static void methoda(double d1);
D. public final double methoda();
6. Which is a valid declarations of a String?
स्ट्रिंग की वैध घोषणा कौन सी है?
A. String s1 = null;
B. String s4 = (String) ‘\ufeed’;
C. String s3 = (String) ‘abc’;
D. String s2 = ‘null’;
7. Which one is a valid declaration of a boolean?
कौन सा एक बूलियन की वैध घोषणा है?
A. boolean b1 = 0;
B. boolean b4 = Boolean.false();
C. boolean b3 = false;
D. boolean b2 = ‘false’;
8. Multiple inheritance means.
Multiple inheritance का अर्थ है।
A. More classes inheriting from more super classes
B. More classes inheriting from one super class
C. One class inheriting from more super classes
D. None of these
9. What is byte code in the context of Java?
जावा के संदर्भ में बाइट कोड क्या है?
A. It is another name for a Java source file.
B. The type of code generated by a Java Virtual Machine.
C. The type of code generated by a Java compiler.
D. It is the code written within the instance methods of a class.
10. Which statement is not true in java language?
जावा भाषा में कौन सा कथन सत्य नहीं है?
A. A private member of a class cannot be accessed from its derived class.
B. A private member of a class cannot be accessed by the methods of the same class.
C. A public member of a class can be accessed in all the packages.
D. A protected member of a class can be accessed from its derived class.
Core Java MCQ Questions and Answers pdf
11. What is garbage collection in the context of Java?
जावा के संदर्भ में कचरा संग्रहण क्या है?
A. When all references to an object are gone, the memory used by the object is automatically reclaimed.
B. Any package imported in a program and not used is automatically deleted.
C. The operating system periodically deletes all the java files available on the system.
D. The JVM checks the output of any Java program and deletes anything that doesn’t make sense.
12. The java run time system automatically calls this method while garbage collection.
जावा रन टाइम सिस्टम कचरा संग्रहण के दौरान स्वचालित रूप से इस विधि को कॉल करता है।
A. finally()
B. finalize()
C. finalizer()
D. finalized()
13. You read the following statement in a Java program that compiles and executes.
आप एक जावा प्रोग्राम में निम्नलिखित कथन पढ़ते हैं जो संकलित और निष्पादित करता है।
submarine.dive(depth);
What can you say for sure?
आप निश्चित रूप से क्या कह सकते हैं?
A. dive must be the name of an instance field.
B. dive must be a method.
C. depth must be an int
D. submarine must be the name of a class
14. The correct order of the declarations in a Java program is _________.
जावा प्रोग्राम में घोषणाओं का सही क्रम _________ है।
A. Import statement, class declaration, package declaration
B. Import statement, package declaration, class declaration
C. Package declaration, import statement, class declaration
D. Class declaration, package declaration, import statement.
15. All exception types are subclasses of the built-in class.
सभी अपवाद प्रकार अंतर्निहित वर्ग के उपवर्ग हैं।
A. Error
B. RuntimeException
C. Exception
D. Throwable
16. An overloaded method consists of ________.
एक overloaded विधि में ________ होता है।
A. The same method name with different number of parameters
B. The same method name with different types of parameters
C. The same method name and same number and type of parameters with different return type
D. Both (a) and (b) above
17. When an overridden method is called from within a subclass, it will always refer to the version of that method defined by the _________.
जब एक उपवर्ग के भीतर से एक ओवरराइड विधि को बुलाया जाता है, तो यह हमेशा _________ द्वारा परिभाषित उस विधि के संस्करण को संदर्भित करेगा।
A. Compiler will choose randomly
B. Subclass
C. Super class
D. Interpreter will choose randomly
18. Which of the following is not a component of Java Integrated Development Environment (IDE)?
निम्नलिखित में से कौन जावा एकीकृत विकास पर्यावरण (आईडीई) का एक घटक नहीं है?
A. Microsoft Visual J++
B. Microsoft Visual Fox Pro
C. Symantec’s Visual Café
D. Borland’s Jbuilder
19. In java, objects are passed as _________.
जावा में, वस्तुओं को _________ के रूप में पारित किया जाता है।
A. Memory address
B. Method called call by value
C. Copy of that object
D. Default constructor.
20. Use the following declaration and initialization to evaluate the Java expressions.
जावा अभिव्यक्तियों का मूल्यांकन करने के लिए निम्नलिखित घोषणा और आरंभीकरण का उपयोग करें।
int a = 2, b = 3, c = 4, d = 5;
float k = 4.3f;
System.out.println( – -b * a + c *d – -);
A. 22
B. 24
C. 26
D. 28
Core Java MCQ Questions and Answers pdf
21. Java compiler javac translates Java source code into ___________.
जावा कंपाइलर javac जावा सोर्स कोड को ___________ में ट्रांसलेट करता है।
A. Assembler language
B. Machine code
C. Bit code
D. Byte code
22. In Java, a character constant’s value is its integer value in the ______ character set.
जावा में, एक वर्ण स्थिरांक का मान ______ वर्ण सेट में उसका पूर्णांक मान होता है।
A. ASCII
B. Unicode
C. EBCDIC
D. Binary
23. ________ are used to document a program and improve its readability.
________ का उपयोग किसी प्रोग्राम को दस्तावेज करने और उसकी पठनीयता में सुधार करने के लिए किया जाता है।
A. System cells
B. Control structures
C. Comments
D. Keywords
24. In Java, a try block should immediately be followed by one or more ______ blocks.
जावा में, एक ट्राई ब्लॉक के तुरंत बाद एक या अधिक ______ ब्लॉक होने चाहिए।
A. Run
B. Throw
C. Error
D. Catch
25. In object-oriented programming, the process by which one object acquires the properties of another object is called _______.
ऑब्जेक्ट-ओरिएंटेड प्रोग्रामिंग में, वह प्रक्रिया जिसके द्वारा एक वस्तु दूसरी वस्तु के गुणों को प्राप्त करती है, _______ कहलाती है।
A. Encapsulation
B. Overloading
C. Polymorphism
D. Inheritance
26. An abstract data type typically comprises a _______ and a set of ________ respectively.
एक अमूर्त डेटा प्रकार में आमतौर पर क्रमशः _______ और ________ का एक सेट होता है।
A. Control structure, operations
B. Data representation, operations
C. Data representation, objects
D. Data representation, classes
27. A process that involves recognizing and focusing on the important characteristics of a situation or object is known as _______.
एक प्रक्रिया जिसमें किसी स्थिति या वस्तु की महत्वपूर्ण विशेषताओं को पहचानना और उन पर ध्यान केंद्रित करना शामिल है, _______ के रूप में जानी जाती है।
A. Abstraction
B. Polymorphism
C. Encapsulation
D. Inheritance
28. In object-oriented programming, composition relates to _________.
object-oriented programming में, composition _________ से संबंधित है।
A. The use of consistent coding conventions
B. The use of inheritance to achieve polymorphic behavior
C. The organization of components interacting to achieve a coherent, common behavior
D. The organization of components interacting not to achieve a coherent common behavior
29. Which statement is true regarding an object?
किसी Object के संबंध में कौन सा कथन सत्य है?
A. An object is a reference to an attribute
B. An object is an instance of a class
C. An object is not an instance of a class
D. An object is what classes instantiated are from
30. In object-oriented programming, new classes can be defined by extending existing classes. This is an example of _________.
ऑब्जेक्ट-ओरिएंटेड प्रोग्रामिंग में, मौजूदा कक्षाओं का विस्तार करके नई कक्षाओं को परिभाषित किया जा सकता है। यह _________ का उदाहरण है।
A. Composition
B. Interface
C. Encapsulation
D. Inheritance
Core Java MCQ Questions and Answers pdf
31. Object-oriented inheritance models ________.
Object-oriented inheritance मॉडल ________।
A. “want to be” relationship
B. “has a” relationship
C. “is a kind of” relationship
D. “contains” of relationship.
32. Which of the following does not belong: If a class inherits from some other class, it should ____.
निम्नलिखित में से कौन सा संबंधित नहीं है: यदि कोई वर्ग किसी अन्य वर्ग से विरासत में मिला है, तो उसे _________ होना चाहिए।
A. Make use of the parent class’s capabilities
B. Over-ride all the methods of its parent class
C. Make sure the result “contains” its base class
D. Make sure the result “IS-A-KIND-OF” its base class
33. The wrapping up of data and functions into a single unit is called _______.
डेटा और फंक्शन को एक इकाई में लपेटने को _______ कहा जाता है।
A. Encapsulation
B. Polymorphism
C. Data Hiding
D. Abstraction
34. In Java, declaring a class abstract is useful _________.
जावा में, क्लास एब्स्ट्रैक्ट घोषित करना _________ उपयोगी है।
A. When default implementations of some methods are not desirable
B. When it doesn’t make sense to have objects of that class
C. To prevent developers from further extending the class
D. To force developers to extend the class not to use its capabilities
35. Basic Java language functions are stored in which of the following java package?
बेसिक जावा लैंग्वेज फंक्शन निम्नलिखित में से किस जावा पैकेज में स्टोर किए जाते हैं?
A. java.lang
B. java.net
C. java.io
D. java.util
36. What is the error in the following class definitions?
निम्नलिखित वर्ग परिभाषाओं में त्रुटि क्या है?
Abstract class xy
{
abstract sum (int x, int y) { }
}
A. Class header is not defined properly
B. Method is defined properly
C. Method is not defined properly
D. Constructor is not defined
37. Which of the following has a method names flush( )?
निम्नलिखित में से किसका एक विधि नाम फ्लश () है?
A. Input stream
B. Reader stream
C. Output Stream
D. Input output stream
38. Which of the following statements are true regarding the finalize( ) method?
फ़ाइनलाइज़ () विधि के संबंध में निम्नलिखित में से कौन सा कथन सत्य है?
A. The finalize ( ) method must be declared with protected accessibility
B. The body of the finalize ( ) method can only access other objects that are eligible for garbage collection
C. The compiler will fail to compile the code that explicitly tries to call the finalize( ) method
D. The finalize ( ) method can be overloaded
39. Which one of the following class definitions is a valid definition of a class that cannot be extended?
निम्नलिखित में से कौन सी वर्ग परिभाषा उस वर्ग की मान्य परिभाषा है जिसे विस्तारित नहीं किया जा सकता है?
A. abstract class Link { }
B. static class Link { }
C. native class Link { }
D. final class Link { }
40. Which one of these is a valid method declaration?
इनमें से कौन एक वैध विधि घोषणा है?
A. void method3(void)
B. void method2()
C. void method1
D. method4()
Core Java MCQ Questions and Answers pdf
41. Which statement is true about accessibility of members?
सदस्यों की पहुंच के बारे में कौन सा कथन सत्य है?
A. A member with default accessibility can be accessed by any subclass of the class in which it is defined
B. Private members can only be accessed by code from within the class of the member
C. Private members are always accessible from within the same package
D. Package/default accessibility for a member can be declared using the keyword default.
42. Which of the following are correct advantages of java?
निम्नलिखित में से कौन जावा के सही फायदे हैं?
A. Java is Portable
B. Java is Secure
C. Java is Simple
D. All of the above
43. Which of the following is true about the use of modifiers?
Modifiers के उपयोग के बारे में निम्नलिखित में से कौन सा सत्य है?
A. Subclasses of a class must reside in the same package as the class they extend
B. You cannot specify accessibility of local variables. They are only accessible within the block in which they are declared
C. If no accessibility modifier (public, protected, and private) is specified for a member declaration, the member is only accessible for classes in the package of its class and subclasses of its class anywhere
D. Local variables can be declared static
44. What makes the Java platform independent?
जावा प्लेटफॉर्म को स्वतंत्र क्या बनाता है?
A. Class compilation
B. It uses bytecode for execution
C. Advanced programming language
D. All of these
45. Multiline comment is created using _____.
बहुपंक्ति टिप्पणी _____ का उपयोग करके बनाई जाती है।
A. <!– — >
B. /* */
C. //
D. All of these
46. 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
47. What is the entry point of a program in Java?
जावा में प्रोग्राम का प्रवेश बिंदु क्या है?
A. main() method
B. Last line of code
C. The first line of code
D. main class
48. Which keyword in java is used for exception handling?
जावा में कौन सा कीवर्ड एक्सेप्शन हैंडलिंग के लिए प्रयोग किया जाता है?
A. throw
B. excepHand
C. exep
D. All of these
49. Method used to take a string as input in Java?
Method जावा में इनपुट के रूप में एक स्ट्रिंग लेने के लिए प्रयोग किया जाता है?
A. nextLine()
B. next()
C. Both A. and B.
D. None of these
50. Which class in Java is used to take input from the user?
जावा में किस वर्ग का प्रयोग यूजर से इनपुट लेने के लिए किया जाता है?
A. Scanner
B. Applier
C. Input
D. None of these
Also Read: Java mcq questions with answers pdf download
51. Which of these is a type of variable in Java?
इनमें से कौन जावा में एक प्रकार का वेरिएबल है?
A. Static Variable
B. Local Variable
C. Instance Variable
D. All of these
52. Which of the following can be declared as final in java?
निम्नलिखित में से किसे जावा में फाइनल घोषित किया जा सकता है?
A. Variable
B. Method
C. Class
D. All of these
53. Static variables in java are declared as ______.
जावा में स्टेटिक वेरिएबल्स को _____ घोषित किया जाता है।
A. Constants
B. new variables
C. final variables
D. All of these
54. 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
55. What is garbage collection in java?
जावा में कचरा संग्रहण क्या है?
A. Method to manage memory in java
B. Delete all values
C. Create new garbage values
D. All of these
56. 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
57. 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 these
58. Which method deletes a file in Java?
जावा में कौन सी विधि फ़ाइल को हटाती है?
A. file.garbage()
B. file.remove()
C. file.delete()
D. file.dump()
59. How can we access methods for file handling in java?
जावा में फाइल हैंडलिंग के लिए हम विधियों का उपयोग कैसे कर सकते हैं?
A. Java.files
B. Java.io.File
C. Java.io
D. Java.FileHandling
60. Which method in java is used to read lines from file?
जावा में फाइल से लाइन पढ़ने के लिए किस विधि का उपयोग किया जाता है?
A. file.getLine()
B. file.nextLine()
C. file.read()
D. All of these
Core Java MCQ Questions and Answers pdf
61. Which method in java is used to generate random numbers in Java?
जावा में यादृच्छिक संख्या उत्पन्न करने के लिए जावा में किस विधि का उपयोग किया जाता है?
A. rand()
B. random()
C. random.nextInt()
D. All of these
62. The correct syntax to import the math library in java is ______.
जावा में math library आयात करने का सही सिंटैक्स ______ है।
A. import java.lang.math
B. import java.math
C. import math
D. All of these
63. In java, recursion is ______.
जावा में, रिकर्सन _________ है।
A. The process to call methods
B. A process allowing methods to call itself
C. Method
D. None of these
64. Which of the following is a valid data structure in java?
निम्नलिखित में से कौन जावा में एक वैध डेटा संरचना है?
A. Vector
B. List
C. Array
D. All of these
65. 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 these
66. 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 these
67. Which of the following methods are present in comparator interface?
निम्नलिखित में से कौन सी विधि तुलनित्र इंटरफ़ेस में मौजूद है?
A. compare()
B. isEqual()
C. equate()
D. All of these
68. Which Java method is used to convert an object to string?
किसी ऑब्जेक्ट को स्ट्रिंग में बदलने के लिए किस जावा विधि का उपयोग किया जाता है?
A. object.string()
B. toString()
C. createString()
D. newString()
69. Which of the following statements is not correct for vectors in Java?
जावा में वैक्टर के लिए निम्नलिखित में से कौन सा कथन सही नहीं है?
A. It was created using vector keyword
B. It is asynchronous
C. It can store an object of different classes
D. None of these
70. 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
Core Java MCQ Questions and Answers pdf
71. What is a deadlock in Java?
जावा में गतिरोध क्या है?
A. State when all processes have complete working and are dead
B. State when threads are not ready
C. State when threads are in hold state forever
D. All of these
72. 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 these
73. Which of the following inheritance of class is invalid in Java?
जावा में निम्न में से कौन-सा वर्ग का वंशानुक्रम अमान्य है?
A. Single
B. Hierarchical
C. Multi-level
D. Multiple
74. Which keyword is used to inherit classes in Java?
जावा में कक्षाओं को इनहेरिट करने के लिए किस कीवर्ड का उपयोग किया जाता है?
A. isChild
B. inheritance
C. extends
D. None of these
75. What is polymorphism in Java?
जावा में polymorphism क्या है?
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 these
76. Which of these is a non-access modifier?
इनमें से कौन एक नॉन-एक्सेस मॉडिफायर है?
A. native
B. private
C. public
D. All of these
77. Empty interface in Java is called?
जावा में खाली इंटरफ़ेस को क्या कहा जाता है?
A. Derived class
B. Abstract class
C. Marker interface
D. None of these
78. When a finally block executed in Java?
जावा में अंत में ब्लॉक कब निष्पादित किया गया?
A. Try block is executed without any exception
B. Executed at last
C. Exception has occurred
D. None of these
79. 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
80. Which method is used to convert radians to degree in Java?
जावा में रेडियन को डिग्री में बदलने के लिए किस विधि का उपयोग किया जाता है?
A. degree()
B. toDegrees()
C. convertRadtoDeg()
D. All of these
Core Java MCQ Questions and Answers pdf
81. Which thread is executed in the background?
background में कौन सा thread निष्पादित किया जाता है?
A. Daemon thread
B. User-created thread
C. New thread
D. All of these
82. Which of the following methods is used to extract the length of a string in Java?
जावा में एक स्ट्रिंग की लंबाई निकालने के लिए निम्नलिखित में से किस विधि का उपयोग किया जाता है?
A. sizeof()
B. len()
C. length()
D. size()
83. Which Java method is used to clear element of ArrayList?
ArrayList के एलीमेंट को क्लियर करने के लिए किस जावा विधि का उपयोग किया जाता है?
A. clearAll()
B. delete()
C. deleteAll()
D. clear()
84. Which Java keyword is used to access features of a package?
पैकेज की सुविधाओं तक पहुँचने के लिए किस जावा कीवर्ड का उपयोग किया जाता है?
A. extends
B. import
C. get
D. All of these
85. Jar in java stands for _____.
जावा में जार का अर्थ _____ है।
A. Java application runner
B. Java application runtime
C. Java ARchive
D. None of these
So friends I hope you enjoy this article related to Core Java MCQ Questions and Answers pdf, Java coding questions and answers pdf, Java Programming Questions and Answers pdf, Java Interview Questions and Answers pdf
Core Java MCQ Questions and Answers pdf download
File Name | Core Java MCQ Questions and Answers pdf |
File Size | 715 KB |
No. of Pages | 22 |
Language | Hindi and English |
Download | Click Here |
Related Searches: Java coding questions pdf, Java important questions and answers pdf, Java interview mcq questions, Java interview questions pdf, Java language mcq, Java mcq pdf download, Java mcq practice test, Java mcq questions test, Core Java MCQ Questions and Answers pdf
Java practical viva questions, Java practice questions pdf, Java programming questions pdf, MCQ for java programming, object oriented programming in java mcq with answers pdf, Core Java MCQ Questions and Answers pdf, mcq on java