Search Suggest

core Java interview questions
core Java interview questions

Core Java - Interview Questions and Answers

491. Which of the following are Java keywords? (multiple) 1) goto 2) malloc 3) extends 4) FALSE Answer : 3 492. What will be the result of compiling …

Core Java - Interview Questions and Answers

481. Which method can be used to enable/diable a checkbox menu item? Ans : setState(boolean). 482. Which of the following may a menu contain? a) A se…

Core Java - Interview Questions and Answers

471. If a frame uses a Grid layout manager and does not contain any panels, then all the components within the frame are the same width and height. T…

Core Java - Interview Questions and Answers

461. Can I create a non-resizable windows? If so, how? Ans: Yes. By using setResizable() method in class Frame. 462. What is the default Layout Manag…

Core Java - Interview Questions and Answers

451. The List component does not generate any events. True. / False. Ans : False. 452. Which components are used to get text input from the user. Ans…

Core Java - Interview Questions and Answers

441. Which constructor creates a TextArea with 10 rows and 20 columns? a) new TextArea(10, 20) b) new TextArea(20, 10) c) new TextArea(new Rows(10), …

Core Java - Interview Questions and Answers

431. What Checkbox method allows you to tell if a Checkbox is checked? Ans : getState() 432. Which Component method is used to access a component'…

Core Java - Interview Questions and Answers

421. You have created a simple Frame and overridden the paint method as follows. public void paint(Graphics g){ g.drawString("Dolly",50,10)…

Core Java - Interview Questions and Answers

411. What is the difference between the paint( ) and repaint( ) method? Ans : The paint( ) method supports painting via a Graphics object. The repain…

Core Java - Interview Questions and Answers

401. What is the sequence for calling the methods by AWT for applets? Ans : When an applet begins, the AWT calls the following methods, in this seque…

Core Java - Interview Questions and Answers

391. The tag contains two attributes namely _________ and _______. Ans : Name , value. 392. Passing values to parameters is done in the _________ fi…

Core Java - Interview Questions and Answers

381. Suppose that you want to have an object eh handle the TextEvent of a TextArea object t. How should you add eh as the event handler for t? a) t.a…

Core Java - Interview Questions and Answers

371. What event results from the clicking of a button? Ans : The ActionEvent event is generated as the result of the clicking of a button. 372. What…

Core Java - Interview Questions and Answers

361. The System.err method is used to print error message. True/False. Ans : True. 362. What is meant by StreamTokenizer? Ans : StreamTokenizer brea…

Core Java - Interview Questions and Answers

351. Which of the following are true? a) The InputStream and OutputStream classes are byte-oriented. b) The ObjectInputStream and ObjectOutputStream …

Core Java - Interview Questions and Answers

341. You execute the code below in an empty directory. What is the result? File f1 = new File("dirname"); File f2 = new File(f1, "file…

Core Java - Interview Questions and Answers

331. Which of the following are true about the Error and Exception classes? a) Both classes extend Throwable. b) The Error class is final and the Exc…

Core Java - Interview Questions and Answers

321. What are the constants defined by both Float and Double classes? Ans : MAX_RADIX, MIN_RADIX, MAX_VALUE, MIN_VALUE and TYPE. 322. What is the pur…

Core Java - Interview Questions and Answers

311. Which of the following is not a wrapper class? String Integer Boolean Character Ans : a. 312. What is the output of the following program? publ…

Core Java - Interview Questions and Answers

STRING HANDLING 301.Which package does define String and StringBuffer classes? Ans : java.lang package. 302. Which method can be used to obtain the …