Core Java Interview Questions 1 What is the difference between an Abstract class and Interface?



Download 126,65 Kb.
Pdf ko'rish
bet55/55
Sana01.02.2022
Hajmi126,65 Kb.
#421305
1   ...   47   48   49   50   51   52   53   54   55
Bog'liq
core java interview ques

Document Outline

  • Core Java Interview Questions
    • 1) What is the difference between an Abstract class and Interface?
    • 2) What are checked and unchecked exceptions?
    • 3) What is a user defined exception?
    • 4) What is the difference between C++ & Java?
    • 5) What are statements in JAVA ?
    • 6) What is JAR file?
    • 7)What is JNI?
    • 8) What is serialization?
    • 9) Why there are some null interface in java ? What does it mean ? Give me some null interfaces in JAVA?
    • 10) Is synchronised a modifier?indentifier??what is it??
    • 11) What is singleton class?where is it used?
    • 12) What is a compilation unit?
    • 13) Is string a wrapper class?
    • 14) Why java does not have multiple inheritance?
    • 15) Why java is not a 100% oops?
    • 16) What is a resource bundle?
    • 17) What is transient variable?
    • 18) What is Collection API?
    • 19) Is Iterator a Class or Interface? What is its use?
    • 20) What is similarities/difference between an Abstract class and Interface?
    • 21) What is a transient variable?
    • 22) Which containers use a border Layout as their default layout?
    • 23) Why do threads block on I/O?
    • 24) How are Observer and Observable used?
    • 25) What is synchronization and why is it important?
    • 26) Can a lock be acquired on a class?
    • 27) What's new with the stop(), suspend() and resume() methods in JDK 1.2?
    • 28) Is null a keyword?
    • 29) What is the preferred size of a component?
    • 30) What method is used to specify a container's layout?
    • 31) Which containers use a FlowLayout as their default layout?
    • 32) What state does a thread enter when it terminates its processing?
    • 33) What is the Collections API?
    • 34) Which characters may be used as the second character of an identifier, but not as the first character of an identifier?
    • 35) What is the List interface?
    • 36) How does Java handle integer overflows and underflows?
    • 37) What is the Vector class?
    • 38) What modifiers may be used with an inner class that is a member of an outer class?
    • 39) What is an Iterator interface?
    • 40) What is the difference between the >> and >>> operators?
    • 41) Which method of the Component class is used to set the position and size of a component?
    • 42) How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
    • 43) What is the difference between yielding and sleeping?
    • 44) Which java.util classes and interfaces support event handling?
    • 45) Is sizeof a keyword?
    • 46) What are wrapped classes?
    • 47) Does garbage collection guarantee that a program will not run out of memory?
    • 48) What restrictions are placed on the location of a package statement within a source code file?
    • 49) Can an object's finalize() method be invoked while it is reachable?
    • 50) What is the immediate superclass of the Applet class?
    • 51) What is the difference between preemptive scheduling and time slicing?
    • 52) Name three Component subclasses that support painting.
    • 53) What value does readLine() return when it has reached the end of a file?
    • 54) What is the immediate superclass of the Dialog class?
    • 55) What is clipping?
    • 56) What is a native method?
    • 57) Can a for statement loop indefinitely?
    • 58) What are order of precedence and associativity, and how are they used?
    • 59) When a thread blocks on I/O, what state does it enter?
    • 60) To what value is a variable of the String type automatically initialized?
    • 61) What is the catch or declare rule for method declarations?
    • 62) What is the difference between a MenuItem and a CheckboxMenuItem?
    • 63) What is a task's priority and how is it used in scheduling?
    • 64) What class is the top of the AWT event hierarchy?
    • 65) When a thread is created and started, what is its initial state?
    • 66) Can an anonymous class be declared as implementing an interface and extending a class?
    • 67) What is the range of the short type?
    • 68) What is the range of the char type?
    • 69) In which package are most of the AWT events that support the event-delegation model defined?
    • 70) What is the immediate superclass of Menu?
    • 71) What is the purpose of finalization?
    • 72) Which class is the immediate superclass of the MenuComponent class.
    • 73) What invokes a thread's run() method?
    • 74) What is the difference between the Boolean & operator and the && operator?
    • 75) Name three subclasses of the Component class.
    • 76) What is the GregorianCalendar class?
    • 77) Which Container method is used to cause a container to be laid out and redisplayed?
    • 78) What is the purpose of the Runtime class?
    • 79) How many times may an object's finalize() method be invoked by the garbage collector?
    • 80) What is the purpose of the finally clause of a try-catch-finally statement?
    • 81) What is the argument type of a program's main() method?
    • 82) Which Java operator is right associative?
    • 83) What is the Locale class?
    • 84) Can a double value be cast to a byte?
    • 85) What is the difference between a break statement and a continue statement?
    • 86) What must a class do to implement an interface?
    • 87) What method is invoked to cause an object to begin executing as a separate thread?
    • 88) Name two subclasses of the TextComponent class.
    • 89) What is the advantage of the event-delegation model over the earlier eventinheritance model?
    • 90) Which containers may have a MenuBar?
    • 91) How are commas used in the intialization and iteration parts of a for statement?
    • 92) What is the purpose of the wait(), notify(), and notifyAll() methods?
    • 93) What is an abstract method?
    • 94) How are Java source code files named?
    • 95) What is the relationship between the Canvas class and the Graphics class?
    • 96) What are the high-level thread states?
    • 97) What value does read() return when it has reached the end of a file?
    • 98) Can a Byte object be cast to a double value?
    • 99) What is the difference between a static and a non-static inner class?
    • 100) What is the difference between the String and StringBuffer classes?
    • 101) If a variable is declared as private, where may the variable be accessed?
    • 102) What is an object's lock and which object's have locks?
    • 103) What is the Dictionary class?
    • 104) How are the elements of a BorderLayout organized?
    • 105) What is the % operator?
    • 106) When can an object reference be cast to an interface reference?
    • 107) What is the difference between a Window and a Frame?
    • 108) Which class is extended by all other classes?
    • 109) Can an object be garbage collected while it is still reachable?
    • 110) Is the ternary operator written x : y ? z or x ? y : z ?
    • 111) What is the difference between the Font and FontMetrics classes?
    • 112) How is rounding performed under integer division?
    • 113) What happens when a thread cannot acquire a lock on an object?
    • 114) What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
    • 115) What classes of exceptions may be caught by a catch clause?
    • 116) If a class is declared without any access modifiers, where may the class be accessed?
    • 117) What is the SimpleTimeZone class?
    • 118) What is the Map interface?
    • 119) Does a class inherit the constructors of its superclass?
    • 120) For which statements does it make sense to use a label?
    • 121) What is the purpose of the System class?
    • 122) Which TextComponent method is used to set a TextComponent to the read-only state?
    • 123) How are the elements of a CardLayout organized?
    • 124) Is &&= a valid Java operator?
    • 125) Name the eight primitive Java types?
    • 126) Which class should you use to obtain design information about an object?
    • 127) What is the relationship between clipping and repainting?
    • 128) Is "abc" a primitive value?
    • 129) What is the relationship between an event-listener interface and an event-adapter class?
    • 130) What restrictions are placed on the values of each case of a switch statement?
    • 131) What modifiers may be used with an interface declaration?
    • 132) Is a class a subclass of itself?
    • 133) What is the highest-level event class of the event-delegation model?
    • 134) What event results from the clicking of a button?
    • 135) How can a GUI component handle its own events?
    • 136) What is the difference between a while statement and a do statement?
    • 137) How are the elements of a GridBagLayout organized?
    • 138) What advantage do Java's layout managers provide over traditional windowing systems?
    • 139) What is the Collection interface?
    • 140) What modifiers can be used with a local inner class?
    • 141) What is the difference between static and non-static variables?
    • 142) What is the difference between the paint() and repaint() methods?
    • 143) What is the purpose of the File class?
    • 144) Can an exception be rethrown?
    • 145) Which Math method is used to calculate the absolute value of a number?
    • 146) How does multithreading take place on a computer with a single CPU?
    • 147) When does the compiler supply a default constructor for a class?
    • 148) When is the finally clause of a try-catch-finally statement executed?
    • 149) Which class is the immediate superclass of the Container class?
    • 150) If a method is declared as protected, where may the method be accessed?
    • 151) How can the Checkbox class be used to create a radio button?
    • 152) Which non-Unicode letter characters may be used as the first character of an identifier?
    • 153) What restrictions are placed on method overloading?
    • 154) What happens when you invoke a thread's interrupt method while it is sleeping or waiting?
    • 155) What is casting?
    • 156) What is the return type of a program's main() method?
    • 157) Name four Container classes.
    • 158) What is the difference between a Choice and a List?
    • 159) What class of exceptions are generated by the Java run-time system?
    • 160) What class allows you to read objects directly from a stream?
    • 161) What is the difference between a field variable and a local variable?
    • 162) Under what conditions is an object's finalize() method invoked by the garbage collector?
    • 163) How are this() and super() used with constructors?
    • 164) What is the relationship between a method's throws clause and the exceptions that can be thrown during the method's execution?
    • 165) What is the difference between the JDK 1.02 event model and the event-delegation model introduced with JDK 1.1?
    • 166) How is it possible for two String objects with identical values not to be equal under the == operator?
    • 167) Why are the methods of the Math class static?
    • 168) What Checkbox method allows you to tell if a Checkbox is checked?
    • 169) What state is a thread in when it is executing?
    • 170) What are the legal operands of the instanceof operator?
    • 171) How are the elements of a GridLayout organized?
    • 172) What an I/O filter?
    • 173) If an object is garbage collected, can it become reachable again?
    • 174) What is the Set interface?
    • 175) What classes of exceptions may be thrown by a throw statement?
    • 176) What are E and PI?
    • 177) Are true and false keywords?
    • 178) What is a void return type?
    • 179) What is the purpose of the enableEvents() method?
    • 180) What is the difference between the File and RandomAccessFile classes?
    • 181) What happens when you add a double value to a String?
    • 182) What is your platform's default character encoding?
    • 183) Which package is always imported by default?
    • 184) What interface must an object implement before it can be written to a stream as an object?
    • 185) How are this and super used?
    • 186) What is the purpose of garbage collection?
    • 187) What is a compilation unit?
    • 188) What interface is extended by AWT event listeners?
    • 189) What restrictions are placed on method overriding?
    • 190) How can a dead thread be restarted?
    • 191) What happens if an exception is not caught?
    • 192) What is a layout manager?
    • 193) Which arithmetic operations can result in the throwing of an ArithmeticException?
    • 194) What are three ways in which a thread can enter the waiting state?
    • 195) Can an abstract class be final?
    • 196) What is the ResourceBundle class?
    • 197) What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?
    • 198) What is numeric promotion?
    • 199) What is the difference between a Scrollbar and a ScrollPane?
    • 200) What is the difference between a public and a non-public class?
    • 201) To what value is a variable of the boolean type automatically initialized?
    • 202) Can try statements be nested?
    • 203) What is the difference between the prefix and postfix forms of the ++ operator?
    • 204) What is the purpose of a statement block?
    • 205) What is a Java package and how is it used?
    • 206) What modifiers may be used with a top-level class?
    • 207) What are the Object and Class classes used for?
    • 208) How does a try statement determine which catch clause should be used to handle an exception?
    • 209) Can an unreachable object become reachable again?
    • 210) When is an object subject to garbage collection?
    • 211) What method must be implemented by all threads?
    • 212) What methods are used to get and set the text label displayed by a Button object?
    • 213) Which Component subclass is used for drawing and painting?
    • 214) What are synchronized methods and synchronized statements?
    • 215) What are the two basic ways in which classes that can be run as threads may be defined?
    • 216) What are the problems faced by Java programmers who don't use layout managers?
    • 217) What is the difference between an if statement and a switch statement?
    • 218) What happens when you add a double value to a String?
    • 219) What is the List interface?

Download 126,65 Kb.

Do'stlaringiz bilan baham:
1   ...   47   48   49   50   51   52   53   54   55




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish