Java script Part-1 1 / 100 Interface implement करते समय कौन सा keyword use होता है? extends implements inherit interface 2 / 100 Interface में variables किस type के होते हैं by default? private protected public static final default 3 / 100 Abstract method किसमें declare होता है? Interface या Abstract class Concrete class Final class None 4 / 100 Java में abstract class का main use क्या है? Object create करने के लिए Inheritance provide करने के लिए Method override prevent करने के लिए Exception handle करने के लिए 5 / 100 Illegal argument pass करने पर कौन सा exception आता है? IllegalArgumentException NullPointerException IOException ClassCastException 6 / 100 Primitive data types को stream में read/write करने के लिए कौन सा class use होता है? DataInputStream / DataOutputStream FileReader / FileWriter BufferedReader / BufferedWriter Scanner / PrintWriter 7 / 100 Byte-based input के लिए कौन सा class use होता है? FileInputStream FileReader BufferedReader Scanner 8 / 100 Character-based output के लिए कौन सा class use होता है? FileWriter FileOutputStream DataOutputStream ObjectOutputStream 9 / 100 Scanner class primitive types के लिए कौन सा method provide करती है? nextInt() nextDouble() nextBoolean() सभी ऊपर वाले 10 / 100 Compile-time पर check नहीं होने वाला exception कौन सा है? IOException SQLException ArithmeticExceptio n FileNotFoundException 11 / 100 Try-with-resources का main benefit क्या है? Automatically resources close हो जाते हैं Java 7 में introduce हुआ Sirf AutoCloseable objects के साथ काम करता है सभी ऊपर वाले 12 / 100 Invalid number format होने पर कौन सा exception आता है? NumberFormatException IOException ArrayIndexOutOfBoundsException IllegalArgumentException 13 / 100 Illegal type casting होने पर कौन सा exception आता है? ClassCastException IOException ArithmeticException NullPointerException 14 / 100 Binary data write करने के लिए कौन सा stream use होता है? FileOutputStream FileWriter BufferedWriter PrintWriter 15 / 100 Binary data read करने के लिए कौन सा stream use होता है? FileInputStream FileReader BufferedReader Scanner 16 / 100 Stack trace print करने के लिए कौन सा method use होता है? getCause() toString() printStackTrace() getMessage() 17 / 100 Exception का description return करने के लिए कौन सा method use होता है? getMessage() getCause() toString() printStackTrace() 18 / 100 Method declare करते समय exception specify करने के लिए कौन सा keyword use होता है? throw throws try catch 19 / 100 Exception throw करने के लिए कौन सा keyword use होता है? throw catch try throws 20 / 100 File में data write करने के लिए कौन सा class use होता है? FileWriter PrintWriter BufferedWriter सभी ऊपर वाले 21 / 100 File में text read करने के लिए कौन सा method use होता है? read() readLine() nextLine() getText() 22 / 100 File read करने के लिए कौन सा class use होता है? FileReader FileInputStream Scanner सभी ऊपर वाले 23 / 100 Encapsulation का मतलब क्या है? Data और methods को एक unit में bind करना (class) Exception handling Thread control Object cloning 24 / 100 Unchecked exception का example क्या है? IOException SQLException FileNotFoundException NullPointerException 25 / 100 Compile-time पर check नहीं होने वाला exception कौन सा है? IOException SQLException ArithmeticException FileNotFoundException 26 / 100 Try-catch-finally में कौन सा block हमेशा execute होता है? throw try catch finally 27 / 100 Reusability को support करने के लिए कौन सा Java feature use होता है? Encapsulation Polymorphism Inheritance Abstraction 28 / 100 Superclass constructor call करने के लिए कौन सा keyword use होता है? super this parent base 29 / 100 Class में कितने constructors हो सकते हैं? 1 Multiple (different parameters) None 2 only 30 / 100 Method overloading किस feature को support करता है? Runtime polymorphism Compile-time polymorphism Abstraction Encapsulation 31 / 100 Autoboxing का मतलब क्या है? Automatic conversion primitive → wrapper type Manual conversion wrapper → primitive Thread creation Object cloning 32 / 100 Wrapper classes किसलिए use होती हैं? Primitive types को object में convert करने के लिए Thread control के लिए Garbage collection के लिए Exception handling के लिए 33 / 100 "==" और ".equals()" में difference क्या है? दोनों same हैं .equals() reference compare करता है, == content compare करता है == reference compare करता है, .equals() content compare करता है None 34 / 100 Class को subclass होने से रोकने के लिए कौन सा keyword use होता है? final static abstract private 35 / 100 Interface में variables by default किस type के होते हैं? default protected public static final private 36 / 100 Object garbage collect होने से पहले कौन सा method call होता है? finalize() constructor() main() delete() 37 / 100 Thread को forcefully terminate करने का best तरीका क्या है? stop() method Use flag / interrupt destroy() kill() 38 / 100 Thread को sleep कराने के लिए कौन सा method use होता है? pause() delay() sleep() wait() 39 / 100 Console से input read करने के लिए कौन सा method use होता है? input() next() / nextLine()(Scanner class) get() read() 40 / 100 HashMap में duplicate keys allowed हैं या नहीं? हाँ नहीं कभी कभी सिर्फ null key 41 / 100 Collection का parent interface कौन सा है? List Collection Map Set 42 / 100 Runtime errors को handle करने के लिए Java में क्या use होता है? Exception Handling Garbage Collection Object Creation Compiler 43 / 100 Exception handling में finally block कब run होता है? सिर्फ exception होने पर चाहे exception हो या न हो सिर्फ exception न होने पर हमेशा, कभी नहीं 44 / 100 Thread start करने के लिए कौन सा method use होता है? run() execute() start() init() 45 / 100 Static keyword का use क्यों किया जाता है? Method override रोकने के लिए Variable/method को सभी objects में share करने के लिए Class inherit करने के लिए Object delete करने के लिए 46 / 100 Current object को refer करने के लिए कौन सा keyword use होता है? current this super self 47 / 100 Object clone करने के लिए कौन सा method use होता है? replicate() duplicate() clone() copy() 48 / 100 कौन सा package हर Java program में default import होता है? java.util java.lang java.io java.net 49 / 100 Java में सभी classes का parent class कौन सा है? Class System Object Main 50 / 100 Java में String immutable क्यों होती है? Performance के लिए Syntax के लिए Compiler requirement के लिए Security और thread-safety के लिए 51 / 100 "==" और ".equals()" में क्या difference है? दोनों same हैं == reference compare करता है, .equals() content compare करता है .equals() reference compare करता है, == content compare करता है None 52 / 100 Final keyword का use क्या है? Variable को constant बनाने के लिए Method override होने से रोकने के लिए Class inherit होने से रोकने के लिए सभी ऊपर वाले 53 / 100 Static variable का मतलब क्या है? Object के लिए अलग value Constant value सभी objects के लिए shared value None 54 / 100 Interface implement करने के लिए कौन सा keyword use होता है? extends interface inherit implements 55 / 100 Java में inheritance के लिए कौन सा keyword use होता है? implements extends inherit super 56 / 100 Method overriding का मतलब क्या है? Subclass method re-define करता है superclass method को Same class में method redefine Different class में method overload Variable override 57 / 100 Method overloading का मतलब क्या है? Same method name, same parameters Different method name, same parameters Same method name, different parammeterse Different method name, different parameters 58 / 100 Constructor का काम क्या होता है? Variable declare करना Memory free करना Object delete करना Object initialize करना 59 / 100 Object create करने के लिए कौन सा keyword use होता है? new create make object 60 / 100 Primitive data type का example कौन सा है? int String Object Array 61 / 100 Boolean variable का default value क्या होता है? true false 0 null 62 / 100 int variable का default value क्या होता है? 0 null false undefined 63 / 100 Array declare करने का valid syntax कौन सा है? int arr[]; int[] arr; Both A and B array int arr; 64 / 100 Loop में current iteration skip करने के लिए कौन सा statement use होता है? skip exit break continue 65 / 100 int x = 5; x += 3; में x की value क्या होगी? 3 5 8 15 66 / 100 निम्न में से कौन Java operators के बारे में सही नहीं है? Java में arithmetic operators हैं Java operator overloading allow करता है Java में logical operators हैं Java में bitwise operators हैं 67 / 100 Interface inherit करने के लिए कौन सा keyword use होता है? extends inherit interface implements 68 / 100 Java में constant define करने के लिए कौन सा keyword use होता है? constant final const immutable 69 / 100 Reference variable का default value क्या होता है? 0 undefined false null 70 / 100 निम्न में से कौन constructor के बारे में गलत है? Constructor का return type हो सकता है Constructor overload हो सकता है Constructor name class name से match होना चाहिए Constructor object create होने पर call होता है 71 / 100 Ternary operator कौन सा है? ? : ++ -- && 72 / 100 Java में valid floating-point type कौन सा है? double float Both A and B long 73 / 100 Java में invalid loop कौन सा है? for while repeat do-while 74 / 100 Objects compare करने के लिए कौन सा method use होता है? == equals() compare() = 75 / 100 कौन सा floating point literal invalid है? 3.14 3.14f 3.14d 3.14L 76 / 100 5 % 2 का output क्या होगा? 2 1 0 Error 77 / 100 निम्न में से कौन Java के बारे में सही नहीं है? Java platform-independent है Java object-oriented है Java supports multiple inheritance through classes Java uses garbage collection 78 / 100 Class members का default access modifier क्या होता है? package-private public protected private 79 / 100 निम्न में से कौन valid Java comment नहीं है? /* comment */ /* comment / // comment <!-- comment --> 80 / 100 Output क्या होगा? System.out.println('A' + 1); A1 66 65 Error 81 / 100 Highest precedence वाला operator कौन सा है? + == * && 82 / 100 Boolean variable का default value क्या होता है? false true 0 null 83 / 100 Inheritance के लिए कौन सा keyword use होता है? implements extends inherits super 84 / 100 Variable की value 1 से बढ़ाने के लिए कौन सा operator use होता है? ++ += +1 -- 85 / 100 Single character store करने के लिए कौन सा data type use होता है? String boolean int char 86 / 100 Loop को तुरंत terminate करने के लिए कौन सा statement use होता है? continue break exit stop 87 / 100 Bitwise AND operator कौन सा है? & | v || 88 / 100 byte का range क्या है? -128 to 127 -256 to 255 0 to 255 -32768 to 32767 89 / 100 निम्न में से कौन valid Java literal नहीं है? 123 0b1010 0xFF 10.5fL 90 / 100 Output क्या होगा? System.out.println(10/3); 3 3.33 3.0 3.333333 91 / 100 कौन सा loop at least एक बार execute होता है? for while do-while foreach 92 / 100 User input लेने के लिए कौन सा class use होता है? BufferedReader Scanner Console All of the above 93 / 100 Java में valid identifier कौन सा है? 1variable variable_1 @variable class 94 / 100 Output क्या होगा? System.out.println(5 + 2 + "Hello"); 7Hello Hello7 52Hello Error 95 / 100 दो objects की equality check करने के लिए कौन सा method use होता है? = == equals () & 96 / 100 Comparison के लिए कौन सा operator use होता है? = == === != 97 / 100 Java में boolean का size कितना होता है? 1 byte 4 bytes JVM पर depend करता है 2 bytes 98 / 100 निम्न में से कौन primitive data type नहीं है? int String boolean char 99 / 100 Java में int variable का default value क्या होता है? 0 null undefined 1 100 / 100 निम्नलिखित में से कौन Java keyword नहीं है? void Boolean static int Your score isThe average score is 65% 0% Restart quiz