www.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk

Similar documents
The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0

An Overview of Java. overview-1

Specialized Programme on Web Application Development using Open Source Tools

Fundamentals of Java Programming

File class in Java. Scanner reminder. Files 10/19/2012. File Input and Output (Savitch, Chapter 10)

Specialized Programme on Web Application Development using Open Source Tools

Java Application Developer Certificate Program Competencies

How To Write A Program For The Web In Java (Java)

Java Interview Questions and Answers

JBoss Portlet Container. User Guide. Release 2.0

Building a Multi-Threaded Web Server

Explain the relationship between a class and an object. Which is general and which is specific?

CS 111 Classes I 1. Software Organization View to this point:

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

Crash Course in Java

Chulalongkorn University International School of Engineering Department of Computer Engineering Computer Programming Lab.

Java Programming Language

Computing Concepts with Java Essentials

Java EE Web Development Course Program

In this chapter, we lay the foundation for all our further discussions. We start

Facebook Twitter YouTube Google Plus Website

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

Java Servlet and JSP Programming. Structure and Deployment China Jiliang University

Hello World Portlet Rendered with JSP for WebSphere Portal Version 4.1

Using Files as Input/Output in Java 5.0 Applications

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

D06 PROGRAMMING with JAVA

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

INPUT AND OUTPUT STREAMS

Object-Oriented Programming in Java

CSC 551: Web Programming. Spring 2004

The Java I/O System. Binary I/O streams (ascii, 8 bits) The decorator design pattern Character I/O streams (Unicode, 16 bits)

Java from a C perspective. Plan

AP Computer Science Java Subset

Web Development in Java

Preet raj Core Java and Databases CS4PR. Time Allotted: 3 Hours. Final Exam: Total Possible Points 75

Creating a Simple, Multithreaded Chat System with Java

Getting Started with the Internet Communications Engine

public static void main(string[] args) { System.out.println("hello, world"); } }

RMI Client Application Programming Interface

Accessing Data with ADOBE FLEX 4.6

Course Name: Course in JSP Course Code: P5

Java the UML Way: Integrating Object-Oriented Design and Programming

13 File Output and Input

File I/O - Chapter 10. Many Stream Classes. Text Files vs Binary Files

WebSphere v5 Administration, Network Deployment Edition

IT6503 WEB PROGRAMMING. Unit-I

Syllabus for CS 134 Java Programming

JDK 1.5 Updates for Introduction to Java Programming with SUN ONE Studio 4

PowerTier Web Development Tools 4

Exception Handling In Web Development DevelopIntelligence LLC

Manual. Programmer's Guide for Java API

Tutorial Reference Manual. Java WireFusion 4.1

CREATE A CUSTOM THEME WEBSPHERE PORTAL

2. Follow the installation directions and install the server on ccc

2. Advance Certificate Course in Information Technology

Ch-03 Web Applications

How To Integrate IIS6 and Apache Tomcat

Designing with Exceptions. CSE219, Computer Science III Stony Brook University

Getting Started with Web Applications

Division of Informatics, University of Edinburgh

ACM Crossroads Student Magazine The ACM's First Electronic Publication

Form Validation. Server-side Web Development and Programming. What to Validate. Error Prevention. Lecture 7: Input Validation and Error Handling

WIRIS quizzes web services Getting started with PHP and Java

Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months

Files and input/output streams

C++ INTERVIEW QUESTIONS

16.1 DataFlavor DataFlavor Methods. Variables

bbc Developing Service Providers Adobe Flash Media Rights Management Server November 2008 Version 1.5

Course Number: IAC-SOFT-WDAD Web Design and Application Development

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

Evaluation. Copy. Evaluation Copy. Chapter 7: Using JDBC with Spring. 1) A Simpler Approach ) The JdbcTemplate. Class...

JAVA - FILES AND I/O

BCA 421- Java. Tilak Maharashtra University. Bachelor of Computer Applications (BCA) 1. The Genesis of Java

CS 1302 Ch 19, Binary I/O

Java (12 Weeks) Introduction to Java Programming Language

Glossary of Object Oriented Terms

Server-Side Web Development JSP. Today. Web Servers. Static HTML Directives. Actions Comments Tag Libraries Implicit Objects. Apache.

Chapter 2 Introduction to Java programming

Web Application Architecture (based J2EE 1.4 Tutorial)

Web Applications. Originals of Slides and Source Code for Examples:

WRITING DATA TO A BINARY FILE

Visual Basic. murach's TRAINING & REFERENCE

INFORMATION BROCHURE

Web Applications and Struts 2

Install Java Development Kit (JDK) 1.8

Application Notes for Packaging and Deploying Avaya Communications Process Manager Sample SDK Web Application on a JBoss Application Server Issue 1.

java Features Version April 19, 2013 by Thorsten Kracht

Mail User Agent Project

Crystal Reports for Eclipse

Web Service Caching Using Command Cache

What is an I/O Stream?

Programmation 2. Introduction à la programmation Java

Terms and Definitions for CMS Administrators, Architects, and Developers

DC60 JAVA AND WEB PROGRAMMING JUNE b. Explain the meaning of the following statement public static void main (string args [ ] )

Essentials of the Java(TM) Programming Language, Part 1

Transcription:

CS506 Web Design and Development Solved Online Quiz No. 01 Which of the following is a general purpose container? JFrame Dialog JPanel JApplet Which of the following package needs to be import while handling files? java.util java.io java.awt javax.swing Exception handling code is written in try block ot confirm catch block finally block throws clause Which of the following stream is a Node stream? PrintWriter FileWriter BufferedReader All of given option Which of the following stream read/write data in the form of bytes? FileReader

FileWriter PrintWriter FileInputStream Which of the following command is used to compile Java code? java filename javac filename.java javac filename java filename.java Which of the following method is used to execute INSERT, UPDATE and Delete SQL statements? executequery(sql); ExecuteQuery(sql); executeupdate(sql); ExecuteUpdate(sql); Which of the following stream is a filter stream? FileWriter FileReader BufferedReader All of given options An event in java is represented as Operator Function Object Primitive data type Which of the following belongs to a category of checked exception? Null Pointer exception

IOException Array index out of bounds NumberFormatException Packages are the way to organize files into different -------------according to their functionality, usability as well as category they should belong to. Directories Folders Libraries None of these When JSP page compiled, it is translated into? Applet Application Servlet Web Browser From the following which ID is transmitted between the client and the server Session ID Network ID Server ID None of these To define the error page in JSP we use following tag? exception-type error-type error-page exception-page Web.xml is a java file configuration file jar file servlet Which of the following is NOT a part of HTTP request?

Request method URI Status code Header fields Which of the following range of response code indicates that request was successful? 100-199 200-299 300-399 400-499 Which of the following Environment variable tells the system about the root directory of TOMCAT? JAva_HOME CATALINA_HOME CLASSPATH PATH Which of the following folder contains configuration file? Classes Lib Bin WEB-INF Which of the following is NOT a web technoloy of Java? Servlet JSP ASP JSF Which of the following approch is used to create threads in java? inheritance interface

Both inheriance and interface None of these Which of the following syntax attaches an output stream to console? FileWriter fw = new FileWriter( output.txt ); FileWriter fw = new FileWriter(FileDescriptor.out); FileWriter fw = new FileWriter(FileDescriptor.in); FileWriter fw = new FileWriter(FileDescriptor); What will happen if static modifier is removed from the signature of main method? The program does not compile The program compiles and runs successfully The program compiles but does not run None of given options v What will happen if main method is declared as private? The program does not compile The program throws an exception at run time The program compiles and runs successfully None of given options A collection can store Homogenous objects Heterogeneous objects Objects as well as primitive values

At most 100 objects The tostring() method returns a representation of int, string string, int string, object object, string Based on functionality, the streams can be categorized as Byte oriented stream and Node stream Filter stream and Character oriented stream Node stream and Filter stream Byte oriented stream and Character oriented stream Which of the following stream read/write data in the form of bytes? FileReader FileWriter PrintWriter FileInputStream If a super class method is protected then overriding method must be protected must be public must be private may be either protected or public Quiz Start Time: 07:13 PM Time Left 81 sec(s) A variable declared as static in a class is a/an Instance variable Class variable Const variable

Global variable Which of the following stream read/write data in the form of bytes? FileReader FileWriter PrintWriter FileInputStream HahMap takes key as a/an Object Array Primitive value Function Which of the following feature is not available in java Pointers Operator overloading Global variables All of given options Static methods can only access Instance variables Instance methods Static variables and methods Both static and instance members What will happen if we write static public void instead of public static void? Program does not compile Program compiles but does not run Program compiles and run successfully Program throws an exception Which of the following method is called only once during life cycle of Servlet

Service() Init() Destroy() Start() Which of the following method allows any other thread of same priority to execute? Sleep() Wait() Notify() Yield() Which of the following problem occurs with lower priority threads? Race Condition Starvation Average waiting time Process Death Which of the following method is used to convert a string into an int value? IntValue() parselnt() Parselnt() parselinteger() The classes which contain the word are bytes oriented streams. Reader Writer Stream Byte To compare the valueof two strings, must be used. =operator ==operator

Equal()method Compare()method Which of the following stream is a Node stream? PrintWriter FileWriter BufferedReader All of the given option The given line of code will results in system.out.println(5+9); 59 5+9 14 syntax error Which of the following feature provides the facility for multiple inheritance Adapter Classes Wrapper Classes Interfaces Collections ==operator compares of strings whereas equals() method compares of the string. Value, Addresses Address, Values Size, Addresses Addresses, Size Which of the following package needs to be import while handling files? Java.util Java.io Java.awt Javas.swing

Which of the following command is used to run java program? Java filename.java Java filename Javac filename.java Javac filename What will happen if we write static public void instead of public static void? Program does not compile Program compiles but does not run Program compiles and run successfully Program throws an exception Which of the following syntax used to attach an input stream to console? FileReader fr=new FileReader((input.txt)) FileReader fr=new FileRead(FileDescriptor.in); FileReader fr=new FileReader(FileDescriptor); Is it possible to provide more than one main method within same class? True False Which of the following is true about abstract class? An abstract class must have all methods declared as abstract methods. A class must have at least one abstract method to be abstract class. A class without any abstract method can be declared as abstract class. An instance of abstract class can be created If a super class method is protected then overriding method must be protected must be public

must be private may be either protected or public Which of the following exception belongs to a category of un-checked exception? IOException Null Pointer exception AWTException ClassNotFoundException Which of the following is called ' pure abstract class '? Concrete class Wrapper class Interface Abstract class with no abstract method Which of the following is true about abstract class? An abstract class must have all methods declared as abstract methods. A class must have at least one abstract method to be an abstract class. A class without any abstract method can be declared as abstract class. An instance of abstract class can be created. Which of the following stream is a filter stream? FileWriter FileReader BufferedReader All of given options The classes which contain the word are byte oriented streams. Reader Writer Stream Byte

Which of the following stream read/write data in the form of bytes? ilereader FileWriter PrintWriter FileInputStream An instance of abstract class cannot be created. TRUE FALSE An abstract class ---------------instantiated. Cannot be Can be Must None of these The relationship between class and interface is called ' Is a ' relationship ' Has a ' relationship ' Responds to ' relationship None of the given options Which of the following belongs to a category of checked exception? Null Pointer exception IOException Array index out of bounds NumberFormatException Which of the following exception belongs to a category of un-checked exception? IOException Null Pointer exception AWTException ClassNotFoundException All the exceptions and errors in java are inherited from class.

Exception Error Throwable IOException Exceptions must be handled while handling files otherwise it may lead to Logical error Syntax error Run-time error No error Which of the following package needs to be import while handling files? java.util java.io java.awt javax.swing When defining a method you must include a/an... to declare any exception that might be thrown but is not caught in the method: try block finally block catch block throws clause A top level class may have only the following access modifier. Package Private Protected Public Which of the following is used for inheritance in java? implements extends : (colon)

inherit A collection can store... Homogenous objects Heterogeneous objects Which of the following syntax is used to attach an input stream to console? FileReader fr = new FileReader(' input.txt ') ; FileReader fr = new FileReader(FileDescriptor.in); FileReader fr = new FileReader(FileDescriptor); FileReader fr = new FileReader(console); Window frame and dialog use as their default layout. Border layout Flow layout GridBag layout Grid layout There are types of exceptions in Java 2 3 4 5 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 Java program code is compiled into form called Machine code native Code

Byte Code Source Code A top level class without any modifier is accessible to any class any class within the same package any class within the same file any subclass of this class Overloading is whereas overriding is Run time binding, compile time binding Late binding, compile time binding Compile time binding, run time binding Run time binding, late time binding Static methods only access instance variable instance method static variables and methods both static and instance members Which of the following is modifier is provided by default if no access is written explicitly? public Private Protected Default HahMap takes key as a/an Object

Array Primitive value Function