Home Tutorialhelp Comment java programming MCQs answers required

 
 

Comment

nasir
java programming MCQs answers required,
May 30, 2010 at 11:54 AM

java MCQs

The keyword this is used to
1. Invoke constructor of the another class
2. Invoke alternate constructor of the same class
3. Invoke constructor of super class form sub class
4. Invoke constructor of sub class from supper class
Which of the following syntax attaches on output stream to console?
1. FileWriter fw=newFileWriter[output.text]
2. FileWriter fw=newFileWriter[fileDescription.out]
3. FileWriter fw=newFileWriter[fileDescriptio.in]
4. FileWriter fw=newFileWriter[fileDesciptor]
What will happen if main method is declared as private?
1. The program does not compile
2. The program throws an exception at runtime
3. The program complies and runs successfully
4. Non of given
What will happen if static modifier is removed from the signature of main method?
1. The program does not compile
2. The program compile and runs successfully
3. The program compile but does not run
4. Non of given
Which of the following methods are invoked by the AWT to support paint and repaint operations?
► paint( )
► repaint( )
► draw( )
► redraw( )
When defining a method you must include a ___________ to declare any exception that might be thrown but is not caught in the method.
► try block
► finally block
► catch block
► throws-clause
Aside from the Scanner class, which of the following classes can be used for text-file file input?
► ObjectInputStream
► BufferedReader
► StringTokenizer
► None of these
Which of the following statements is true regarding Vectors with no specified base type?
► A base type is needed, because Java needs to know how to allocate memory.
► No base type is needed, because Java will use the Object class as a base type.
► If a base type is not specified the code will not compile.
► No base type is needed because Vectors default to storing String objects.
A serializable class must implement the method(s) _________.
► readObject and writeObject
► Either readObject or writeObject, or both, depending upon the desired behavior
► No need to implement any method
► None of the given option
Which of the following are passed as an argument to the paint ( ) method?
► A Canvas object
► A Graphics object
► An Image object
► A paint object
The code below draws a line. What color is the line?
g.setColor(Color.red.green.yellow.red);
g.drawLine(0, 0, 100,100);
► Red
► Green
► Yellow
What if the static modifier is removed from the signature of the main method?
► The program does not compile
► The program compiles but does not run
► The program compiles and runs properly
► The program throws an exception on compile time
What if the main method is declared as private?
► The program does not compile
► The program compiles but does not run
► The program compiles and runs properly
► The program throws an exception on compile time
A member variable or method prefixed by the protected access modifier can be accessed:
► Within the same class
► Within the sub-class
► Within the same package
► All of the above
Which of the following is modifier is provided by default if no access is written explicitly?
1. public
2. Private
3. Protected
4. Default
This is used to ________
1. Invokes constructor of another class
2. Invokes alternate constructor from same class
3. Invokes constructor of super class from sub class
4. Invokes constructor of sub class from super class
In Java a final class must be sub-classed before it.
True/ False
A top level class without any modifier is accessible to
1. any class
2. any class within the same package
3. any class within the same file
4. any subclass of this class
A top level class may have only the following access modifier.
1. Package
2. Private
3. Protected
4. Public
In Java an abstract class cannot be sub-classed
True / False
Given a one dimensional array arr, what is the correct way of getting the number of elements in arr
1. arr.length
2. arr.length – 1
3. arr.size – 1
4. arr.length()
When recursive method is called to solve a problem, the method actually is capable of solving only the simpler case(s), or base case(s).
True / False
Which of these are valid declarations for the main method?
1. public void main();
2. public static void main(String args[]);
3. static public void main(String);
4. public static int main(String args[]);
Map interface is derived from the Collection interface.
True / False
In Java, which of these classes implement the LayoutManager interface?
1. RowLayout
2. ColumnLayout
3. GridBagLayout
4. FlowLayoutManager
BorderLayout is the default layout manager for a JFrame’s content pane
True / False
_________ define behavior and ____________ define implementation
Java program code is compiled into form called
1. Machine code
2. native Code
3. Byte Code
4. Source Code


View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Programming Questions

Questions and Answers Help
Questions and Answers Help      ...://www.roseindia.net/answers/viewqa/Java-Beginners/11976-Java-Hello-World-code... program. Providing the details description of the problem help the other 

Programming Questions

Questions and Answers Help
Questions and Answers Help      ...://www.roseindia.net/answers/viewqa/Java-Beginners/11976-Java-Hello-World-code... program. Providing the details description of the problem help the other 

Programming Questions

Software Questions and Answers
from within Java program. JMS - JMS questions and answers... all over the world to solve their web programming problems with the kind help... the answers to the questions if you know. Try to help the developer community 

Programming Tutorials

Core Java Interview questions and answers
Core Java Interview questions and answers  ... and answers in one place. These Core Java Interview Questions are supported... the answers. We are constantly trying to provide best Core Java Interview questions. You 

Java Beginners

help required in coding
help required in coding  hi..... I want to display output in graphical format . Can u tell me how it can be done? using for project java swings. plzzzzzz helpp 

Swing AWT

Help Required - Swing AWT
Help Required  How to bring password field in JDialogueBox??? ... static String HELP = "help"; private JFrame controllingFrame; //needed..."); JButton helpButton = new JButton("Help 

Programming Questions

Software Questions and Answers
of answers to common programming problems. Ask Questions | Browse... and experience earned during java programming and software developing periods... the answers of the questions asked. JavaMail - Java API to send 

Java Beginners

code required
code required  I am making a blog in java using netbeans and database connectivity with SQL Server 2008. I am using JSP pages for the same... page Will you plz help me out by providing me with the code 

Java Beginners

oop answers - Java Beginners
. Write a Java statement that prints the values of the instance variables of x. i. Write a Java statement that creates the XClass object t and initializes... can help me...as soon as possible thank you for sharing ur time 

Java Beginners

Java programming using ArrayList Help?
Java programming using ArrayList Help?  Hi,can anybody help and guide me on doing this java program? (Largest rows and columns)Write a program... and column indices with the most 1s. Here are the output required: Enter the array 

Java Beginners

Java programming using ArrayList Help?
Java programming using ArrayList Help?  Hi,can anybody help and guide me on doing this java program? (Largest rows and columns)Write a program... and column indices with the most 1s. Here are the output required: Enter the array 

JSP Servlet Questions

Help
Help  <%@ page language="java" contentType="text/html; charset...; " id="radio4" name="radio"/> <%@ page language="java...=connection.createStatement(); ResultSet rs=stmt.executeQuery("SELECT answers FROM Pri1EngAnswer 

Java Beginners

Urgent java programming question.Pls help
Urgent java programming question.Pls help  Q1. Generate 10 thousand random integers with values in the range between 1 to 100. Q2. Store each... and at the end of the last attach operation. Q3. Measure the required time 

Java Beginners

Java Programming Need Help ASAP
Java Programming Need Help ASAP  You are required to develop a student menu system that is similar to the bank system covered in class..., their year (you can assume they all start in year 1), their programming mark 

Java Server Faces Questions

Editor help required. - Java Server Faces Questions
Editor help required.  I am having problem with editor used to design JSP page in JSF applications. I want to open JSP page with Web Page Editor... are they? Please Help me.... Thanks In advance 

JSP Servlet Questions

Required help about the concept of JSP page reloading
Required help about the concept of JSP page reloading  Hi, We..., Java in the business layer and finally DB2 as back-end. In certain cases... char set. Your inputs are highly appreciated. It will help us to have better 

JSP Servlet Questions

Required help about the concept of JSP page reloading
Required help about the concept of JSP page reloading  Hi, We..., Java in the business layer and finally DB2 as back-end. In certain cases... set. Your inputs are highly appreciated. It will help us to have better insight 

Struts Questions

Java Answers
Java Answers  How to Dispaly databsae records in my jsp page using collections Java Class   Visit Here 

Struts Questions

Java Answers
Java Answers  How to Dispaly databsae records in my jsp page using collections Java Class   Visit Here 

Struts Questions

Java Answers
Java Answers  How to Dispaly databsae records in my jsp page using collections Java Class   Visit Here   For getting records from database to java collections you want to do following steps. 1.Declare 

Struts Questions

Java Answers
Java Answers  How to Dispaly databsae records in my jsp page using collections Java Class   1)BeanServlet.java: import java.io....){ } } } 2)beandata.jsp: <%@page language="java" import="java.util.*" %> < 

Struts Questions

please help me to answers this question about C++.....huuhuhuhu
please help me to answers this question about C++.....huuhuhuhu  1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers 

HTML Questions

please help me to answers this question about C++.....huuhuhuhu
please help me to answers this question about C++.....huuhuhuhu  1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers 

Java Beginners

Java Programming Help
Java Programming Help  Hello ! I m the student of last year and i need your help to complete my java project. I going to make a site like youtube... with controls .. I Just want to use jsp and applet in my project . Please help me 

Java Beginners

Need Help in Java programming
Need Help in Java programming  Hello. Can someone please help me with writing the following program Java program that gives assignment details such as:assignment number,assignment name,due date,submission date,percentage marks 

Java Beginners

Java Programming Code HELP
Java Programming Code HELP  Hi, sir/madam. I am new here and currently developing a program whereby it can read the Java source file... the expert can help me to solve this problem and pull out the attribute name. Can sir 

Java Beginners

Need help in java programming
Need help in java programming  Hello. Can someone please help me with writig the following programm. Assignment 20% Presentation 10% Mini Test 10% Exam 60% Java program that accepts the following details: student 

Java Interview Questions

Plz give the answers - Java Interview Questions
), is the number itself. Write a JAVA program to find all perfect numbers between 2... the console   Hi friend, Code to help in solving the problem... information,Examples and tutorials on java visit to : http 

Java Beginners

Java programming help - Java Beginners
Java programming help  Write a program that asks the user for an integer, and if the input is positive, puts stars on the screen - one star on line... for more information. http://www.roseindia.net/java/ Thanks 

Java Beginners

Craps Game Java Programming Help
Craps Game Java Programming Help  Craps is a casino game that involves the throwing of a pair of dice. Based on the throw, the thrower either gets... roll. You may wish to print the roll sequence to help you debug. Output 

JavaScript Questions

code required.!
Java Script phone number entered by person should be in numeric only. code required!  i am using javascript coding on jsp page. i want that the phone number entered by person should be in numeric only..can i get code 

Software Services

Outsourcing - Answers to Critism, Outsourcing Answers Critics
Outsourcing - Answers to Criticism, Outsourcing Answers Critics Introduction As the outsourcing juggernaut rolls on, business... that help businesses. However critics raise issues like worker security 

Java Interview Questions

help
(); } } SFDV2103 ?? Java Programming Fall, 2012 Term Project... on the percentage of cheating. SFDV2103 ?? Java Programming Fall, 2012 Term... based on the percentage of cheating. please help me 

WebSevices Questions

socket programming in java - WebSevices
socket programming in java  hello i hv made a socket program using...) are required?? since i have only 1 pc at home,wen i run the client side program it shows unknown host.please help me 

Java Interview Questions

Java interview questions and answers
Java interview questions and answers   what is garbage collection? What is the process that is responsible for doing that in java? Ans.Reclaiming... in Java? Ans. Runtime.getRuntime().exec(?.) 5.What is the basic difference 

General

Java programming
support examples related to each Java programming technology that will help... Java programming       Java programming language is useful for development of enterprise grade 

Java Beginners

plz Help me find the correct programs answers
plz Help me find the correct programs answers   Create a washing machine class with methods as switchOn, acceptClothes, acceptDetergent, switchOff... INDICA" and "TATA NANO" respectively. Plz mail me your answers 

JSP Interview Questions

I want this jsp answers
I want this jsp answers    How can we declare third party classes and interfaces inside our jsp page? How can we declare and definr global variables... jsp page, server can develop a .java file for a particular jsp page or not? What 

JSP Interview Questions

I want this jsp answers
I want this jsp answers    How can we declare third party classes and interfaces inside our jsp page? How can we declare and definr global variables... jsp page, server can develop a .java file for a particular jsp page or not? What 

Development process Questions

HELP! Design Review & Risk Management topics (in Java projects) required - Development process
HELP! Design Review & Risk Management topics (in Java projects) required  Hi, I have to take 2 one hour sessions on the following topics... topics/examples/case studies for the same? Any help will be much appreciated 

Java-Tutorials

Learning Java programming for Beginners
Learning Java programming is not a difficult task as it has been hyped... queries will be answered. Now online learning of Java programming is becoming.... Reasons behind it are many. Learning Java programming online is free 

Java Beginners

Java programming help with files - Java Beginners
Java programming help with files  I want a code or the following program .thanks Write a program that reads employee data into a vector. The data is composed of : - id# - name - nationality - job title the program 

Java Beginners

Java Programming
://www.roseindia.net/answers/viewqa/Java-Beginners/27008-q-in-java.html...Java Programming  Assume that bank maintains two kinds of accounts...://www.roseindia.net/tutorial/java/core/bankAccountApplication.html   thnk 

Java Beginners

java programming
java programming  how to count the no. of constants in a user given string?? plzz help 

Java Beginners

Java Programming
Java Programming  Using Java Frame form, help me develop a GPA calculating device, able to show Grade and points together, and using MySQL database 

Java Beginners

Java Programming
Java Programming  Using Java Frame form, help me develop a GPA calculating device, able to show Grade and points together, and using MySQL database 

JSP Servlet Questions

code required in servlet
code required in servlet  hello... you provided me the answer with javascript.. i want to check which button is clicked in the servlet.. i have only... help 

Spring Framework Questions

property datasource required - Spring
property datasource required  Hi I am using java springs I am using mysql as backend I am getting one error when i compile the application.property datasource required. This is my dispatcher-servlet.xml 

Interview Questions

Common Interview Questions and Their Answers.
assimilate them. Writing down these answers and rehearsing them will help you... Common Interview Questions and Their Answers... important part of these is your answers. Also make sure to check how long you speak 

Java Beginners

Date Format required to change in java
Date Format required to change in java  can we change the format of date like sql as per our requirements???If yes then please give the detail solution 

Java Beginners

programming
Java Constructor programming for single and double constructor  write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object 

Java-Tutorials

Basic Java programming for Beginners
programming. Basic Java tutorials of Roseindia help all those by giving them...Basic Java programming for Beginners helps them to learn the fundamentals of the language easily and quickly. Java is an Object Oriented Programming language 

Java Beginners

java apptitude question and answers - Java Beginners
java apptitude question and answers  i want java appititude question and answers  Hi Friend, Please visit the following link: http://www.roseindia.net/interviewquestions/ Thanks 

Java Technology Tutorials

Java File Programming
Java File Programming articles and example code In this section we will teach you about file programming in your Java applications. Java File Programming... program. Java programming language provides many API for easy file management. Java 

Java Beginners

Programming problem - Java Beginners
Programming problem  Good afternoon Ma'am/Sir, Can you help me... it difficult to learn java programming? Based on my survey it seems that java programming is the hardest part of their studies.. I also want to know 

Java-Tutorials

Programming in Java for beginners
Programming in Java can be difficult sometimes especially for beginners... but also help Java professionals in solving there queries. Java is an object-oriented... in no time, only thing required is hard work. Program written in Java can run on any 

Programming Questions

Question Answer
to programming technologies such as Java. .NET, C#, C, C++, HTML, JavaScript..., please follow these steps: Only post your Java or Open Source or technical... and email address is mandatory for the users. The query relating to Java 

Java Beginners

programming
Java no argument constructor programming  write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object of in this constructor he we 

Java Beginners

programming
Java single parameter constructor  write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object of in this constructor he we tell 

Java Beginners

programming
Java parameter constructor  write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object of in this constructor he we tell the how much 

Java Beginners

programming
Constructor in java application  write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object of in this constructor he we tell the how 

Java Beginners

programming
Constructing a constructor in java application  write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object of in this constructor he 

Java Beginners

programming
constructor object in java application programming  write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object of in this constructor 

Java Beginners

programming
Construct a constructor of object in Java programming  write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object 

Java Beginners

Programming
Programming  how to save output of java file in .txt format?   Hi, If you are running the example from dos prompt you can use the > bracket to direct the output to a text file. Here is the example: C:>java 

Ajax-Tutorial

ajax programming
is based on the HTML, Java Script, CSS, and XML. Why Ajax Programming? When you...Ajax Programming What is Ajax Programming? Asynchronous JavaScript and XML.... Easy to learn and easy to write technology. Where to Start Ajax Programming 

Java Beginners

java Programming - Java Beginners
java Programming  hi all i want to devlop a gui for compiling java program. so please help me how could i do this. means to say that how can i compile java program on clicking of a button. please reply me 

Java Beginners

java programming - Java Beginners
java programming  i'm asking for the java code for adding , viewing... a code..help me plzz  Hi Friend, Please go through the following links: http://www.roseindia.net/java/example/java/swing/add_edit_and_delete 

Java Beginners

core Java programming
core Java programming  Hi, Thanks for ur previous answers.... I need some of these answers also... Bharathi Indian Cuisine is a leading Indian...;TIME:HHMMSS;ITEM1:QTY:PRICE;ITEM2:PRICE2;] They are looking for a Java Program 

Java Beginners

java programming - Java Beginners
java programming  Hi Buddies, i want java Array ,looping... is write a program in java to print * * * * * * * * * * the o/p will come like that structure   Hi friend, Code to help 

Java Beginners

java programming - Java Beginners
java programming  hi!!! we have been allocated a project "remote admin"? but we dont knw how to proceed further?? what should we do first? plz help me out? r there any user manuals to help us out, from this conditions 

Java Beginners

java programming - Java Beginners
java programming  hi sir, i hav send u a code jus now regarding that program but it tends to be having error. Can u help me check? And still not sure whether some place got error 

JDBC Questions

Programming - JDBC
Programming  Thank you for the reply , but i want it using MS-ACCESS as data storage only. and what JAVA version is to be used in compiling. paki... VERY MUCH ! TRULY YOU SERVE A BIG HELP FOR ME 

Java Beginners

Java programming - Java Beginners
Java programming  The Problem Write a program that asks the user to enter two words. The program then prints out both words on one line. The words...; ? or output the required line with the words on. In writing this program you 

Java Beginners

java programming - Java Beginners
java programming  asking for java code .. counting for how many times the character is being entered in phrase like for instance.. input: learning... -- 1 help me plz... thank u ahead   Hi Friend, Try the following 

Java Beginners

java programming - Java Beginners
java programming   this is my preoccupation: i design an 2-tier application, the program has the *login window* and *main windows*. I want to get..., I am sending you a link. This link will help you. Please visit for more 

Spring Framework Questions

java programming please - Spring
java programming please  please i want your help :-( using JCreator program Your local bank has contracted you to design a Java application that will process saving account data for a given customer in a given year 

Java Beginners

java programming code
java programming code  strong textHi I need the java code for the folllowing java output can you help me?The user inputs for the program are in inverted commas thank you. Blockquote HARDWARE ITEMS CODE DESCRIPTION UNIT 

Programming Tutorials

Tools required to build Simple Cart
tools are required--- Java Development Kit (JDK), 1.4 or later. Apache Ant... Tools required to build Simple Cart       Shopping cart application is written in Java and so 

Java Beginners

Java Programming Question
Java Programming Question  Write a program in Java to create a menu bar with the help of event handlers.   Hi Friend, Try this: import javax.swing.*; import java.awt.event.*; public class SwingMenuBar{ public 

JDBC Questions

java programming problem - JDBC
java programming problem  Hi, Request you to provide a solution... database using java / j2ee. mail id : raichallp@yahoo.co.in... this will help you a lot. Thanks RoseIndia Team 

Development process Questions

help
help   how i can send a pitcture on url in java 

Java Beginners

programming code - Java Beginners
programming code  program code for converting temperature from celsius to fahrenheit or fahrenheit to celsius using if-then-else to decide if celsius... will really help you. import java.io.*; import java.util.*; class 

Java Beginners

Java Programming using array
Java Programming using array  I'm creating a programming using array that will accept 10 letters and test if those letters are consonant...("Wrong Input!"); } } Help me out please.   hi friend, Try 

JDBC Questions

java servlet programming - JDBC
java servlet programming  how to insert value in a column of datatype - datetime in sql 2000 using java servlets???? can ne 1 help me out???  Hi neepa, you have to put the datetime in single quotes. For ex 

Java Beginners

Programming Difficulty - Java Beginners
Programming Difficulty  Suppose that a file named "testdata.txt" contains the following information: The first line of the file is the name...; Hi friend, Code to help in read the text file 

Applet Questions

help
help  pls help me to get the code of a java program a program to perform different shapes in a menu using javaapplet 

EJB Questions

java programming - EJB
java programming  Write an EJB program using simple bean concept to display the message " I am learning to work with Enterprise Java Bean "? .../ejb/ejb-hello-world.shtml We hope that the above link will help you to display 

Java Beginners

Where to learn java programming language
. These tutorials and example will help you in learning Java programming language very...Where to learn java programming language  I am beginner in Java and want to learn Java and become master of the Java programming language? Where 

Java Beginners

help
help  i need help with this code. write a java code for a method named addSevenToKthElement that takes an integer array, and an integer k as its arguments and returns the kth element plus 7. any help would be greatly 

Programming Questions

Question-Answer Guidelines
and get their answers? RoseIndia Q&A service is only for troubleshooting the Java and OpenSource programming and developing fields, not the broad field... guidelines: Do this: The user must post the query relating to only Java 

JDBC Questions

java servlet programming - JDBC
java servlet programming  Hii! frnds My reqiurement... as a single file. but how to do this? plz ne1 help me out.... i m doing programming through servlets Thanx   Hi friend, i am sending multiple 

Spring Framework Questions

java programming - Spring
java programming  please i want your help and solution also in this example: using JCreatorPro program Write a Java program that does the following: // TODO, Ask the user for his name // TODO, ask 

Java Beginners

mobile programming - Java Beginners
mobile programming  hai sir i need ur help... i need source code j2me about bike racing game.. coming Wednesday i have to submit the project.. so plzz send me the coding bike racing as soon.... thank you sir 

Java Beginners

help - Java Beginners
, Java : Java is great programming language for the development of enterprise..., and this is very similar to C++. Java Programming Language is simplified to eliminate language features that cause common programming errors. Java source code 

Java Server Faces Questions

required treenodes checkboxes are not clicking if u change the url - Java Server Faces Questions
browser and receiving in d Library.java. By d help of set and get method d required...required treenodes checkboxes are not clicking if u change the url  ... changes in the screen . can anybody help asap. Library.java 

Java Beginners

Swing programming - Java Beginners
{ JFrame f = new JFrame("Frame in Java Swing"); f.getContentPane... someone help me.  Hi Friend, We have modified your code,try... in Java Swing"); f.getContentPane().setLayout(null); JLabel lbl1 = new JLabel 

jQuery

jQuery required validation
jQuery required Validation: jQuery "required" is the method...;/option>. Getting Started with jQuery required : In this example there are the following steps which are used to make jQuery required. This example  Makes 

WebSevices Questions

help
help  Hii.. I have to design one registration page in java that looks like REGISTER USERNAME (here i have to check whether username already exists... to the user) please tell me how could i design that. Please help me asap Thanks a lot 

Java-Tutorials

Java Programming Tutorials for beginners
Java Programming tutorials for beginners are made in such a way that a programmer, who has no knowledge of programming whatsoever, can also learn Java programming with ease. The Java tutorials available at Roseindia are prepared b 

Advertisements Advertisements
 

 

 

DMCA.com