CS506 Web Programming and Development Solved Subjective Questions With Reference For Final Term Lecture No 1

Size: px
Start display at page:

Download "CS506 Web Programming and Development Solved Subjective Questions With Reference For Final Term Lecture No 1"

Transcription

1 P a g e 1 CS506 Web Programming and Development Solved Subjective Questions With Reference For Final Term Lecture No 1 Q1 Describe some Characteristics/Advantages of Java Language? (P#12, 13, 14) 1. Java is WORA (Write once run anywhere) 2. Java is Object oriented or network friendly language 3. Java is network based 4. Multi Threaded, 5. High Performance dynamic language 6. Java is programmer efficient 7. Java is very Robust language 8. Simple and Secure 9. port able Q2 Give some similarities b/w Java with C/C++ p#15 (from internet also) 1. Both are object oriented based languages 2. Both languages allow to write comments for code understanding 3. Inheritance (single inheritance in case of Java) 4. Classes are used in both C/C++ and Java 5. in both languages semicolon is placed at the end of statement except at the end of class (semicolon is not placed at end of class in java) Lecture No 2 Q3 what is JVM? P#17 JVM stands for Java Virtual Machine. Java byte code executes by software known as virtual machine so JVM executes java byte code or executable code. We can say that central part of java platform is JVM. Q4 what is meant by byte code in Java? P# 17 Java programs are compiles in the form of byte code. Java compiler reads program (source code) and translate it in to byte code (understandable or executable) and places it into class files Q5 what is JRE? P# 18

2 P a g e 2 JRE stands for Java Runtime environment. JVM (Java Virtual Machine) is part of JRE. JRE consists of built in classes and JVM. Without JRE it is impossible to run java software. Q6 Write Program Development and Execution steps involved in Java? P#19 There are following steps involved 1. Edit 2. Compile 3. Load 4. Verify 5. Execute Q7 why the main method is declared as static in Java program? P#29 It is made as static so that Java Run time environment (JRE) can call it with out creating an object. If main method is not static then JRE have to call object of the class in which main method is present and call the main method on that object. So making main method static allows JRE to call it without creating object. Q8 what does Void in main method indicates P#29 it indicates that main ( ) does not return any thing. Lecture No 3 Q9 what is String? P#30 String is sequence of characters stored in the memory and accessible as a unit. Java strings are represented as objects Q10 Differentiate b/w == and equals method? P#30 == allows shallow comparison while equals operator allows deep comparison so in java we use equals operator for comparison instead of == operator. Example: string1.equals (string2) // (comparison of two strings using equals operator in java) Q11Why java is object oriented? P#34

3 P a g e 3 Every thing in java is an object as every class in java inherits from class object by default. Java programming can not be done by classes so we can say that classes are building blocks for java programming. That is why java is object oriented because java programming can not be done without classes/ objects. Q12 how we can we create object of Wrapper Class? P#35 we can create object of Wrapper Class using a string or primitive data type Example: Integer num = new Integer (4); Integer num = new Integer ( 4 ); We can also use corresponding value function to get primitive data type from a wrapper. Example: Int primnum = num.intvalue ( ); Q13 how can we convert strings to numeric primitive data types? P#35 We can convert a string to primitive data type using parse ( ) method. Example: String value 552; Int d = Integer.parseInt (value); Example: String value 3.14; Double d = Double.parseDouble (value); Lecture No 4 Q14 Define the followings P#40 Class, object, constructor, attribute and methods Class Definition: Class is user defined data type. It is prototype for objects. Classes are basic features of OOP (object oriented programming) With out classes, it is not possible to program in java.

4 P a g e 4 Object Definition: Objects are instances of class. These are created from class. Examples are nouns, things in the world. Constructor Definition It is used for initialization. It is used to create an object and to initialize it. Constructor has the same name as the name of class. Attribute Definition: Attribute represents characteristics or properties of object Methods Definition: Methods are the actions that an object can perform. Q15 Write some differences b/w Java and C/C++? P#41 1. Unlike C/C++ every thing resides inside the class in Java where as in C/C++ there are also present global functions and variables. 2. All methods are written inline in Java 3. There is no semicolon at the end of class in Java 4. Constructors and Destructors both are used in C/C++ but in Java only constructors are used and destructors are not required in Java as memory management is responsibility of JVM in java. Q16 Name the access modifiers used in Java? P#41 there are three access modifiers used in java Public: accessible by anyone at anywhere Private: only accessible within the class Protected: accessible to the class itself, to its subclass, or other classes within the same package.

5 P a g e 5 Q17 what do you know about static variables and methods? P#47 static variables and methods are associated with the class itself and not tied to any particular object. Static variables and methods are generally accessible by class name Q18 for what purpose, Finalize method is used? P#47 To recycle the object of class we use finalize ( ) method Q19 Describe advantages of inheritance and what type of inheritance java supports? P#52 Java allows single inheritance and keyword extends is used in java for inheritance. All classes are inherited from object class. Advantages of Inheritance 1. Provides reusability 2. No need to create objects again and again 3. Time saving 4. Easy to implement and Understand Q20 what is polymorphism in Java? P#57 Poly means many and Morphic means shapes means many shapes so polymorphism in java means having multiple behaviors Q21 what is type casting and its Types? Explain with example?p#5 Type casting means conversion of one entity type into another. It is of two types 1. Up Casting 2. Down Casting Up Casting Conversion of smaller data type into bigger one Example Int a = 10; Double b = a;

6 P a g e 6 Example: Employee e = new Teacher ( ); Down Casting Conversion of bigger data type into smaller one Example: Double a = 7.65 Int b = (int) a; Lecture No 6 Q22 what is collection what is its advantage and which package we need to import while using it? P#60 Collection is group of objects known as its elements Advantage of collection over array is we don t need to know the eventual size of collection in order to add objects in to it. We need to import Java.util package to use collection. Q23What are basic methods of Collection P#60 Basic methods are 1. Constructor 2. int size ( ) 3. Boolean add (Object) 4. Boolean isempty ( ) 5. Boolean contains (Object) 6. Boolean removes (Object) Q24 Difference b/w Array and Array list P#61 Array is of fixed size once created can not be modified can not add or delete any record. Array list is resizable. It can grow or shrink over time. Q25 Describe Methods of Array list? P#61 Methods are 1. Int size ( ) 2. add (Object) 3. Object get (int index) 4. remove (int index)

7 P a g e 7 Q26 what is hash map describe its methods? P#63 hash map stores elements in the form of key value pair. A key is associated with each object stored. Keys are unique and allow fast retrieval of object. Methods are 1. put (Object key, Object value) 2. object get (Object key) 3. int size ( ) Lecture No 7 Q27 what are types of error? P#70 three types of errors are 1. Syntax error( Language syntax errors) 2. Logic error (error in logic unexpected output results) 3. runtime error (Exceptional errors) Q28 what is exception how program can handle it? P#70 an exception is an event that usually signals an erroneous situation at run time. A program handles exception as 1. ignore it 2. handle it where it occurs 3. handle it another place in the program Q29 what are types of exception? P#72 Checked and Unchecked Exceptions UN Checked Exception Subclass of run time exception/error Can be solved by debugging Does not require explicit handling Cause due to internal factors Examples: Null pointer exception, Division by zero exception Checked Exceptions 1. Can not be solved by debugging 2. must be caught/declare in throws clause 3. subclass of exceptions

8 P a g e 8 4. caused due to external factors 5. compiler error if not handled properly Q30 How java handles exceptions? P#72 java handles exception through 5 keywords Try, Catch, throw, throws and finally Finally block always executes Catch block is used for exception handling To avoid a code which could generate errors enclose it in try block To normally throw an exception, through keyword is used. If not interested in handling exception then use throws block Lecture No 8 Q31 what do you know about Stream? P#85 streams are abstraction of data source/sink. We can consider stream as data path data can flow through this path in one direction. Streams can be 1. Node Stream 2. Filter Stream Lecture No 9 Q32 what is abstract class? P#96 instance of an abstract class can not be instantiated because it is used to define part of implementation only Q33 what is interface class? P#98 these are special java types contain only set of method prototype. These do not provide implementation. So interface is pure abstract class. Q34 what is Graphical user interface? P#102 A GUI component is an object with which user interact via mouse or keyboard. Q35 what is meant by look and feel in Java? P#102 The appearance and how user interacts with program is known as look and feel. Q36 what package is needed to import for making GUI? P#102 javax.swing or Java.awt package

9 P a g e 9 Q37 what are container and its types? P#104 A container is a collection of related components which allows other components to be nested inside it Types of container are Top Level Container: (can exist independently/alone JFrame, Applet) General Purpose Container: (can not exist independently/alone like JPanel, Tool bar) Q38 Write steps for creating GUI in Java? P# Import required package Import javax.swing.*; /import Java.awt.*; 2. setup top level container 3. get component area for top level container 4. Apply layout to component area 5. create and add components 6. set size of frame and make it visible Q39 Name the Layouts supported in java P# Border Layout 2. Flow Layout 3. Box Layout 4. Grid Layout 5. Card Layout 6. Grid Bag Layout Lecture No 11 Q40 How Java handle events write steps? P# Create components which can generate events (Event Generation) 2. Guild components that can handle events ( Event Handlers) 3. Register handler with generators Lecture No 12 Q41 how can we handle mouse events in java? P#130 Two types of listener interfaces are available for handling mouse events 1. Mouse Listener (Clicked, Exit, Pressed, Released, Enter)

10 P a g e Mouse Motion Listener (Dragged, Moved) Q42 how window events are handled in Java? P#133 these are handled through window listener interface there are 7 methods available 1. Window activated 2. Window Closed 3. Window Closing 4. Window Deactivated 5. Window Deiconified 6. Window Iconified 7. Window Open Lecture No 13 Q43 what are adapter classes? P#136 Adapter classes provide definition for all the methods (empty bodies) corresponding to listener interface Q45 what is meant by inner classes? P#139 A class defined within another class is inner class Q46 Differentiate b/w named and anonymous objects Anonymous objects: 1. Difficult to understand 2. Shorter 3. Has no name 4. same as inner class in capabilities 5. used when there is only one time use of particular object Named Objects: 1. Easy to understand 2. Have name 3. used when repeated use of an object is required Lecture No 14 Q47 Write steps involved in JDBC? P# Import required package java.sql.*; 2. Load Database driver

11 P a g e Define connection URL 4. establish connection with DB 5. Create statement 6. Execute query 7. Close the connection Lecture No 15 Q48 name statement methods? P# execute Update ( ) 3. getmaxrows ( )/setmaxrows ( ) 4. getquerytimeout ( )/setquerytimeout ( ) Q49 Describe different types of statements? P#159 Statement Prepared Statement Callable Statement Q50 Write syntax of update query P#153 String sql = INSERT INTO table name + (columns name) Values (values) Int count = stmt.executeupdate (sql); Lecture No 16 Q51 what does result set contains? P#162 it contains result of SQL query Q52 Name useful result set methods? P#162 next ( ) 2. Getters 3. Close ( ) 4. Absolute (int) 5. Updaters 6. Update Row ( ) 7. MoveToInsertRow (int) 8. InsertRow ( ) 9. DeleteRow ( ) 10 Last ( ) Fist ( ) 11. GetRow ( )

12 P a g e 12 Lecture No 17 Q53 what is Meta data? P#174 data about data is known as Meta data. Q54 How to create result set Meta data object? P#174 ResultSetMetaData rsmd = rs.getmetadata ( ); Q55 Name methods of ResultSetMetaData P#174 getcolumncount ( ) GetColumnType ( ) GetColumnName ( ) GetColumnLable (int) GetColumnDisplaySize ( ) Q56 Name JDBC driver Types P#179 JDBC-ODBC Bridge Native-API /Partly java driver Net-Protocol Driver/All Java Driver Native-Protocol Driver/All Java Driver Lecture No 18 Q57 Write methods used for painting swing components? P#186 PaintComponent ( ) PaintBorder ( ) PaintChildern ( ) Q58 Write steps that we need to follow in order to perform painting? P# Subclass JPanel 2. Override paintcomponent (Graphics g) method 3. install that JPanel inside the JFrame Lecture No 20 Q59 what is applet and is it a JPanel? P#199 It is a small program written in java and included in HTML page. It is independent of the OS on which it runs that is why an applet is a panel because it allows interaction with java program. Q60 what can an applet do? (Methods) P#201

13 P a g e 13 An applet can initialize itself init ( ) It can start itself start ( ) It can stop itself stop ( ) It can destroy itself (it can perform final cleanup) destroy ( ) Lecture No 21 Q62 What is socket and describe its advantages? P#211 socket is bidirectional communication link b/w two programs running on a network. Advantages: 1. Provides more control 2. Used for client server communication 3. Efficient performance 4. We can read/write a network through sockets Q63 what is Port? P#211 port is transparent address to which processes can listen communication request Q64 Write steps to make Client connection? P# import package java.net and java.io 2. connect socket with server 3. Get I/O streams of socket 4. Send/Receive Message 5. Close Socket Q65 Write steps to make simple server connection? P# import package java.net and java.io 2. Create server socket 3. Wait for incoming connections 4. Get I/O streams of socket 5. Send/Receive Message 6. Close Socket Lecture No 22

14 P a g e 14 Q66 why we need serialization? P#219 We need serialization to send an object to stream Q67 how can we prevent serialization? P#225 there is no need to serialize sockets, streams, DB connections because they don t represent state of object. For serialization prevention we use transient keyword with the object which we don t want to serialize Like transient Sockets s; transient Connection con; etc

Virtualians.ning.pk. 2 - Java program code is compiled into form called 1. Machine code 2. native Code 3. Byte Code (From Lectuer # 2) 4.

Virtualians.ning.pk. 2 - Java program code is compiled into form called 1. Machine code 2. native Code 3. Byte Code (From Lectuer # 2) 4. 1 - What if the main method is declared as private? 1. The program does not compile 2. The program compiles but does not run 3. The program compiles and runs properly ( From Lectuer # 2) 4. The program

More information

Come & Join Us at VUSTUDENTS.net

Come & Join Us at VUSTUDENTS.net Come & Join Us at VUSTUDENTS.net For Assignment Solution, GDB, Online Quizzes, Helping Study material, Past Solved Papers, Solved MCQs, Current Papers, E-Books & more. Go to http://www.vustudents.net and

More information

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries 1 CONTENTS 1. Introduction to Java 2. Holding Data 3. Controllin g the f l o w 4. Object Oriented Programming Concepts 5. Inheritance & Packaging 6. Handling Error/Exceptions 7. Handling Strings 8. Threads

More information

DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY ACADEMIC YEAR (ODD SEM)

DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY ACADEMIC YEAR (ODD SEM) DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY ACADEMIC YEAR 2018-19 (ODD SEM) DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING SUB: OBJECT ORIENTED PROGRAMMING SEM/YEAR: III SEM/ II YEAR

More information

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE PART A UNIT I 1. Differentiate object oriented programming from procedure oriented programming. 2. Define abstraction and encapsulation. 3. Differentiate

More information

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started Application Development in JAVA Duration Lecture: Specialization x Hours Core Java (J2SE) & Advance Java (J2EE) Detailed Module Part I: Core Java (J2SE) Getting Started What is Java all about? Features

More information

Compaq Interview Questions And Answers

Compaq Interview Questions And Answers Part A: Q1. What are the difference between java and C++? Java adopts byte code whereas C++ does not C++ supports destructor whereas java does not support. Multiple inheritance possible in C++ but not

More information

Object Oriented Programming with Java. Unit-1

Object Oriented Programming with Java. Unit-1 CEB430 Object Oriented Programming with Java Unit-1 PART A 1. Define Object Oriented Programming. 2. Define Objects. 3. What are the features of Object oriented programming. 4. Define Encapsulation and

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java.

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java. [Course Overview] The Core Java technologies and application programming interfaces (APIs) are the foundation of the Java Platform, Standard Edition (Java SE). They are used in all classes of Java programming,

More information

Core JAVA Training Syllabus FEE: RS. 8000/-

Core JAVA Training Syllabus FEE: RS. 8000/- About JAVA Java is a high-level programming language, developed by James Gosling at Sun Microsystems as a core component of the Java platform. Java follows the "write once, run anywhere" concept, as it

More information

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5 Objective Questions BCA Part III page 1 of 5 1. Java is purely object oriented and provides - a. Abstraction, inheritance b. Encapsulation, polymorphism c. Abstraction, polymorphism d. All of the above

More information

Get Unique study materials from

Get Unique study materials from Downloaded from www.rejinpaul.com VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : IV Section : EEE - 1 & 2 Subject Code

More information

Framework. Set of cooperating classes/interfaces. Example: Swing package is framework for problem domain of GUI programming

Framework. Set of cooperating classes/interfaces. Example: Swing package is framework for problem domain of GUI programming Frameworks 1 Framework Set of cooperating classes/interfaces Structure essential mechanisms of a problem domain Programmer can extend framework classes, creating new functionality Example: Swing package

More information

Java Programming. Price $ (inc GST)

Java Programming. Price $ (inc GST) 1800 ULEARN (853 276) www.ddls.com.au Java Programming Length 5 days Price $4235.00 (inc GST) Overview Intensive and hands-on, the course emphasizes becoming productive quickly as a Java application developer.

More information

Which of the following syntax used to attach an input stream to console?

Which of the following syntax used to attach an input stream to console? Which of the following syntax 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);

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK B.E. - Electrical and Electronics Engineering IV SEMESTER CS6456 - OBJECT ORIENTED

More information

CS506 Web Design & Development Final Term Solved MCQs with Reference

CS506 Web Design & Development Final Term Solved MCQs with Reference with Reference I am student in MCS (Virtual University of Pakistan). All the MCQs are solved by me. I followed the Moaaz pattern in Writing and Layout this document. Because many students are familiar

More information

LTBP INDUSTRIAL TRAINING INSTITUTE

LTBP INDUSTRIAL TRAINING INSTITUTE Java SE Introduction to Java JDK JRE Discussion of Java features and OOPS Concepts Installation of Netbeans IDE Datatypes primitive data types non-primitive data types Variable declaration Operators Control

More information

This page intentionally left blank

This page intentionally left blank This page intentionally left blank arting Out with Java: From Control Structures through Objects International Edition - PDF - PDF - PDF Cover Contents Preface Chapter 1 Introduction to Computers and Java

More information

Core Java SYLLABUS COVERAGE SYLLABUS IN DETAILS

Core Java SYLLABUS COVERAGE SYLLABUS IN DETAILS Core Java SYLLABUS COVERAGE Introduction. OOPS Package Exception Handling. Multithreading Applet, AWT, Event Handling Using NetBean, Ecllipse. Input Output Streams, Serialization Networking Collection

More information

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this

More information

SELF-STUDY. Glossary

SELF-STUDY. Glossary SELF-STUDY 231 Glossary HTML (Hyper Text Markup Language - the language used to code web pages) tags used to embed an applet. abstract A class or method that is incompletely defined,

More information

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1 Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1 Introducing Object Oriented Programming... 2 Explaining OOP concepts... 2 Objects...3

More information

CHAPTER 1: A GENERAL INTRODUCTION TO PROGRAMMING 1

CHAPTER 1: A GENERAL INTRODUCTION TO PROGRAMMING 1 INTRODUCTION xxii CHAPTER 1: A GENERAL INTRODUCTION TO PROGRAMMING 1 The Programming Process 2 Object-Oriented Programming: A Sneak Preview 5 Programming Errors 6 Syntax/Compilation Errors 6 Runtime Errors

More information

Contents. iii Copyright 1998 Sun Microsystems, Inc. All Rights Reserved. Enterprise Services August 1998, Revision B

Contents. iii Copyright 1998 Sun Microsystems, Inc. All Rights Reserved. Enterprise Services August 1998, Revision B Contents About the Course...xv Course Overview... xvi Course Map... xvii Module-by-Module Overview... xviii Course Objectives... xxii Skills Gained by Module... xxiii Guidelines for Module Pacing... xxiv

More information

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

(800) Toll Free (804) Fax   Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days Course Description This course introduces the Java programming language and how to develop Java applications using Eclipse 3.0. Students learn the syntax of the Java programming language, object-oriented

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 60 0 DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK III SEMESTER CS89- Object Oriented Programming Regulation 07 Academic Year 08 9 Prepared

More information

Framework. Set of cooperating classes/interfaces. Example: Swing package is framework for problem domain of GUI programming

Framework. Set of cooperating classes/interfaces. Example: Swing package is framework for problem domain of GUI programming Frameworks 1 Framework Set of cooperating classes/interfaces Structure essential mechanisms of a problem domain Programmer can extend framework classes, creating new functionality Example: Swing package

More information

Sri Vidya College of Engineering & Technology

Sri Vidya College of Engineering & Technology UNIT I INTRODUCTION TO OOP AND FUNDAMENTALS OF JAVA 1. Define OOP. Part A Object-Oriented Programming (OOP) is a methodology or paradigm to design a program using classes and objects. It simplifies the

More information

1 Shyam sir JAVA Notes

1 Shyam sir JAVA Notes 1 Shyam sir JAVA Notes 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write

More information

CS Internet programming Unit- I Part - A 1 Define Java. 2. What is a Class? 3. What is an Object? 4. What is an Instance?

CS Internet programming Unit- I Part - A 1 Define Java. 2. What is a Class? 3. What is an Object? 4. What is an Instance? CS6501 - Internet programming Unit- I Part - A 1 Define Java. Java is a programming language expressly designed for use in the distributed environment of the Internet. It was designed to have the "look

More information

1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these. Answer: B

1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these. Answer: B 1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these 2. How many primitive data types are there in Java? A. 5 B. 6 C. 7 D. 8 3. In Java byte, short, int and long

More information

First Name: AITI 2004: Exam 2 July 19, 2004

First Name: AITI 2004: Exam 2 July 19, 2004 First Name: AITI 2004: Exam 2 July 19, 2004 Last Name: Standard Track Read Instructions Carefully! This is a 3 hour closed book exam. No calculators are allowed. Please write clearly if we cannot understand

More information

15CS45 : OBJECT ORIENTED CONCEPTS

15CS45 : OBJECT ORIENTED CONCEPTS 15CS45 : OBJECT ORIENTED CONCEPTS QUESTION BANK: What do you know about Java? What are the supported platforms by Java Programming Language? List any five features of Java? Why is Java Architectural Neutral?

More information

ABOUT CORE JAVA COURSE SCOPE:

ABOUT CORE JAVA COURSE SCOPE: ABOUT CORE JAVA COURSE SCOPE: JAVA based business programs perform well because constant JAVA requirements help designers to create multilevel programs with a component centered approach. JAVA growth allows

More information

2. (True/False) All methods in an interface must be declared public.

2. (True/False) All methods in an interface must be declared public. Object and Classes 1. Create a class Rectangle that represents a rectangular region of the plane. A rectangle should be described using four integers: two represent the coordinates of the upper left corner

More information

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours Java for Programmers Course (equivalent to SL 275) 36 Contact Hours Course Overview This course teaches programmers the skills necessary to create Java programming system applications and satisfies the

More information

CS Exam 1 Review Suggestions

CS Exam 1 Review Suggestions CS 235 - Fall 2015 - Exam 1 Review Suggestions p. 1 last modified: 2015-09-30 CS 235 - Exam 1 Review Suggestions You are responsible for material covered in class sessions, lab exercises, and homeworks;

More information

Introduction This assignment will ask that you write a simple graphical user interface (GUI).

Introduction This assignment will ask that you write a simple graphical user interface (GUI). Computing and Information Systems/Creative Computing University of London International Programmes 2910220: Graphical Object-Oriented and Internet programming in Java Coursework one 2011-12 Introduction

More information

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes Java CORE JAVA Core Java Programing (Course Duration: 40 Hours) Introduction to Java What is Java? Why should we use Java? Java Platform Architecture Java Virtual Machine Java Runtime Environment A Simple

More information

Introduction to the JAVA UI classes Advanced HCI IAT351

Introduction to the JAVA UI classes Advanced HCI IAT351 Introduction to the JAVA UI classes Advanced HCI IAT351 Week 3 Lecture 1 17.09.2012 Lyn Bartram lyn@sfu.ca About JFC and Swing JFC Java TM Foundation Classes Encompass a group of features for constructing

More information

First Name: AITI 2004: Exam 2 July 19, 2004

First Name: AITI 2004: Exam 2 July 19, 2004 First Name: AITI 2004: Exam 2 July 19, 2004 Last Name: JSP Track Read Instructions Carefully! This is a 3 hour closed book exam. No calculators are allowed. Please write clearly if we cannot understand

More information

CS 11 java track: lecture 3

CS 11 java track: lecture 3 CS 11 java track: lecture 3 This week: documentation (javadoc) exception handling more on object-oriented programming (OOP) inheritance and polymorphism abstract classes and interfaces graphical user interfaces

More information

JAVA. Duration: 2 Months

JAVA. Duration: 2 Months JAVA Introduction to JAVA History of Java Working of Java Features of Java Download and install JDK JDK tools- javac, java, appletviewer Set path and how to run Java Program in Command Prompt JVM Byte

More information

Java Primer 1: Types, Classes and Operators

Java Primer 1: Types, Classes and Operators Java Primer 1 3/18/14 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Java Primer 1: Types,

More information

Page 1

Page 1 Java 1. Core java a. Core Java Programming Introduction of Java Introduction to Java; features of Java Comparison with C and C++ Download and install JDK/JRE (Environment variables set up) The JDK Directory

More information

"Charting the Course... Java Programming Language. Course Summary

Charting the Course... Java Programming Language. Course Summary Course Summary Description This course emphasizes becoming productive quickly as a Java application developer. This course quickly covers the Java language syntax and then moves into the object-oriented

More information

OBJECT ORIENTED PROGRAMMING TYm. Allotted : 3 Hours Full Marks: 70

OBJECT ORIENTED PROGRAMMING TYm. Allotted : 3 Hours Full Marks: 70 I,.. CI/. T.cH/C8E/ODD SEM/SEM-5/CS-504D/2016-17... AiIIIII "-AmI u...iir e~ IlAULAKA ABUL KALAM AZAD UNIVERSITY TECHNOLOGY,~TBENGAL Paper Code: CS-504D OF OBJECT ORIENTED PROGRAMMING TYm. Allotted : 3

More information

Review sheet for Final Exam (List of objectives for this course)

Review sheet for Final Exam (List of objectives for this course) Review sheet for Final Exam (List of objectives for this course) Please be sure to see other review sheets for this semester Please be sure to review tests from this semester Week 1 Introduction Chapter

More information

Atelier Java - J1. Marwan Burelle. EPITA Première Année Cycle Ingénieur.

Atelier Java - J1. Marwan Burelle.  EPITA Première Année Cycle Ingénieur. marwan.burelle@lse.epita.fr http://wiki-prog.kh405.net Plan 1 2 Plan 3 4 Plan 1 2 3 4 A Bit of History JAVA was created in 1991 by James Gosling of SUN. The first public implementation (v1.0) in 1995.

More information

DEPARTMENT OF INFORMATION TECHNOLOGY

DEPARTMENT OF INFORMATION TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY II Year/III Sem CS8392- OBJECT ORIENTED PROGRAMMING Prepared by: Komal Kumar.N, AP/IT, VTHT UNIVERSITY QUESTIONS FROM 2011 to 2018 PART-A 1. What are the advantages

More information

Selected Java Topics

Selected Java Topics Selected Java Topics Introduction Basic Types, Objects and Pointers Modifiers Abstract Classes and Interfaces Exceptions and Runtime Exceptions Static Variables and Static Methods Type Safe Constants Swings

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

1 OBJECT-ORIENTED PROGRAMMING 1

1 OBJECT-ORIENTED PROGRAMMING 1 PREFACE xvii 1 OBJECT-ORIENTED PROGRAMMING 1 1.1 Object-Oriented and Procedural Programming 2 Top-Down Design and Procedural Programming, 3 Problems with Top-Down Design, 3 Classes and Objects, 4 Fields

More information

Peers Techno log ies Pv t. L td. Core Java & Core Java &Adv Adv Java Java

Peers Techno log ies Pv t. L td. Core Java & Core Java &Adv Adv Java Java Page 1 Peers Techno log ies Pv t. L td. Course Brochure Core Java & Core Java &Adv Adv Java Java Overview Core Java training course is intended for students without an extensive programming background.

More information

Name of subject: JAVA PROGRAMMING Subject code: Semester: V ASSIGNMENT 1

Name of subject: JAVA PROGRAMMING Subject code: Semester: V ASSIGNMENT 1 Name of subject: JAVA PROGRAMMING Subject code: 17515 Semester: V ASSIGNMENT 1 3 Marks Introduction to Java (16 Marks) 1. Write all primitive data types available in java with their storage size in bytes.

More information

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION Course Title: Java Technologies Grades: 10-12 Prepared by: Rob Case Course Unit: What is Java? Learn about the history of Java. Learn about compilation & Syntax. Discuss the principles of Java. Discuss

More information

The JFrame Class Frame Windows GRAPHICAL USER INTERFACES. Five steps to displaying a frame: 1) Construct an object of the JFrame class

The JFrame Class Frame Windows GRAPHICAL USER INTERFACES. Five steps to displaying a frame: 1) Construct an object of the JFrame class CHAPTER GRAPHICAL USER INTERFACES 10 Slides by Donald W. Smith TechNeTrain.com Final Draft 10/30/11 10.1 Frame Windows Java provides classes to create graphical applications that can run on any major graphical

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

MyProgram m i ng Lab. get with the programming. Through the power of practice and immediate personalized

MyProgram m i ng Lab. get with the programming. Through the power of practice and immediate personalized get with the programming Through the power of practice and immediate personalized feedback, MyProgrammingLab improves your performance. MyProgram m i ng Lab Learn more at www.myprogramminglab.com Preface

More information

B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA

B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE

More information

Casting -Allows a narrowing assignment by asking the Java compiler to "trust us"

Casting -Allows a narrowing assignment by asking the Java compiler to trust us Primitives Integral types: int, short, long, char, byte Floating point types: double, float Boolean types: boolean -passed by value (copied when returned or passed as actual parameters) Arithmetic Operators:

More information

S.No Question Blooms Level Course Outcome UNIT I. Programming Language Syntax and semantics

S.No Question Blooms Level Course Outcome UNIT I. Programming Language Syntax and semantics S.No Question Blooms Level Course Outcome UNIT I. Programming Language Syntax and semantics 1 What do you mean by axiomatic Knowledge C254.1 semantics? Give the weakest precondition for a sequence of statements.

More information

Chapter 3 Syntax, Errors, and Debugging. Fundamentals of Java

Chapter 3 Syntax, Errors, and Debugging. Fundamentals of Java Chapter 3 Syntax, Errors, and Debugging Objectives Construct and use numeric and string literals. Name and use variables and constants. Create arithmetic expressions. Understand the precedence of different

More information

Index COPYRIGHTED MATERIAL

Index COPYRIGHTED MATERIAL Index COPYRIGHTED MATERIAL Note to the Reader: Throughout this index boldfaced page numbers indicate primary discussions of a topic. Italicized page numbers indicate illustrations. A abstract classes

More information

A- Core Java Audience Prerequisites Approach Objectives 1. Introduction

A- Core Java Audience Prerequisites Approach Objectives 1. Introduction OGIES 6/7 A- Core Java The Core Java segment deals with the basics of Java. It is designed keeping in mind the basics of Java Programming Language that will help new students to understand the Java language,

More information

A Quick Tour p. 1 Getting Started p. 1 Variables p. 3 Comments in Code p. 6 Named Constants p. 6 Unicode Characters p. 8 Flow of Control p.

A Quick Tour p. 1 Getting Started p. 1 Variables p. 3 Comments in Code p. 6 Named Constants p. 6 Unicode Characters p. 8 Flow of Control p. A Quick Tour p. 1 Getting Started p. 1 Variables p. 3 Comments in Code p. 6 Named Constants p. 6 Unicode Characters p. 8 Flow of Control p. 9 Classes and Objects p. 11 Creating Objects p. 12 Static or

More information

B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA

B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE

More information

Core Java Interview Questions and Answers.

Core Java Interview Questions and Answers. Core Java Interview Questions and Answers. Q: What is the difference between an Interface and an Abstract class? A: An abstract class can have instance methods that implement a default behavior. An Interface

More information

E Oracle 10g Java Bootcamp I v1

E Oracle 10g Java Bootcamp I v1 E Oracle 10g Java Bootcamp I v1 Student Guide Volume 1 D22059GC10 Edition 1.0 October 2005 D22281 Authors Jeff Gallus Glenn Stokol Editor Gayathri Rajagopal Technical Contributors and Reviewers Kenneth

More information

Chapter 6 Introduction to Defining Classes

Chapter 6 Introduction to Defining Classes Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of

More information

CS 335 Lecture 02 Java Programming

CS 335 Lecture 02 Java Programming 1 CS 335 Lecture 02 Java Programming Programming in Java Define data Calculate using data Output result Java is object-oriented: Java program must: Merge data and functions into object Invoke functions

More information

Oracle 10g: Java Programming

Oracle 10g: Java Programming Oracle 10g: Java Programming Volume 1 Student Guide D17249GC12 Edition 1.2 July 2005 D19367 Author Kate Heap Technical Contributors and Reviewers Ken Cooper Brian Fry Jeff Gallus Glenn Maslen Gayathri

More information

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING CS6456 OBJECT ORIENTED PROGRAMMING

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING CS6456 OBJECT ORIENTED PROGRAMMING DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING CS6456 OBJECT ORIENTED PROGRAMMING Unit I : OVERVIEW PART A (2 Marks) 1. Give some characteristics of procedure-oriented

More information

The Sun s Java Certification and its Possible Role in the Joint Teaching Material

The Sun s Java Certification and its Possible Role in the Joint Teaching Material The Sun s Java Certification and its Possible Role in the Joint Teaching Material Nataša Ibrajter Faculty of Science Department of Mathematics and Informatics Novi Sad 1 Contents Kinds of Sun Certified

More information

Murach s Beginning Java with Eclipse

Murach s Beginning Java with Eclipse Murach s Beginning Java with Eclipse Introduction xv Section 1 Get started right Chapter 1 An introduction to Java programming 3 Chapter 2 How to start writing Java code 33 Chapter 3 How to use classes

More information

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17 List of Programs xxv List of Figures xxix List of Tables xxxiii Preface to second version xxxv PART 1 Structured Programming 1 1 Getting started 3 1.1 Programming 3 1.2 Editing source code 5 Source code

More information

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7)

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7) Software Development & Education Center Java Platform, Standard Edition 7 (JSE 7) Detailed Curriculum Getting Started What Is the Java Technology? Primary Goals of the Java Technology The Java Virtual

More information

Java Programming Lecture 6

Java Programming Lecture 6 Java Programming Lecture 6 Alice E. Fischer Feb 15, 2013 Java Programming - L6... 1/32 Dialog Boxes Class Derivation The First Swing Programs: Snow and Moving The Second Swing Program: Smile Swing Components

More information

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.aspx?m=5507&c=618&mo=18917&t=191&sy=2012&bl...

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.aspx?m=5507&c=618&mo=18917&t=191&sy=2012&bl... Page 1 of 13 Units: - All - Teacher: ProgIIIJavaI, CORE Course: ProgIIIJavaI Year: 2012-13 Intro to Java How is data stored by a computer system? What does a compiler do? What are the advantages of using

More information

CS11 Java. Fall Lecture 4

CS11 Java. Fall Lecture 4 CS11 Java Fall 2006-2007 Lecture 4 Today s Topics Interfaces The Swing API Event Handlers Inner Classes Arrays Java Interfaces Classes can only have one parent class No multiple inheritance in Java! By

More information

SCHEME OF COURSE WORK

SCHEME OF COURSE WORK SCHEME OF COURSE WORK Course Details: Course Title Object oriented programming through JAVA Course Code 15CT1109 L T P C : 3 0 0 3 Program: B.Tech. Specialization: Information Technology Semester IV Prerequisites

More information

FOR BEGINNERS 3 MONTHS

FOR BEGINNERS 3 MONTHS JAVA FOR BEGINNERS 3 MONTHS INTRODUCTION TO JAVA Why Java was Developed Application Areas of Java History of Java Platform Independency in Java USP of Java: Java Features Sun-Oracle Deal Different Java

More information

CSC Java Programming, Fall Java Data Types and Control Constructs

CSC Java Programming, Fall Java Data Types and Control Constructs CSC 243 - Java Programming, Fall 2016 Java Data Types and Control Constructs Java Types In general, a type is collection of possible values Main categories of Java types: Primitive/built-in Object/Reference

More information

F1 A Java program. Ch 1 in PPIJ. Introduction to the course. The computer and its workings The algorithm concept

F1 A Java program. Ch 1 in PPIJ. Introduction to the course. The computer and its workings The algorithm concept F1 A Java program Ch 1 in PPIJ Introduction to the course The computer and its workings The algorithm concept The structure of a Java program Classes and methods Variables Program statements Comments Naming

More information

OracleAS 10g R3: Java Programming

OracleAS 10g R3: Java Programming OracleAS 10g R3: Java Programming Volume I Student Guide D18382GC20 Edition 2.0 April 2007 D50171 Authors Patrice Daux Kate Heap Technical Contributors and Reviewers Ken Cooper C Fuller Vasily Strelnikov

More information

CS304 Object Oriented Programming Final Term

CS304 Object Oriented Programming Final Term 1. Which of the following is the way to extract common behaviour and attributes from the given classes and make a separate class of those common behaviours and attributes? Generalization (pg 29) Sub-typing

More information

Lecture 20. Java Exceptional Event Handling. Dr. Martin O Connor CA166

Lecture 20. Java Exceptional Event Handling. Dr. Martin O Connor CA166 Lecture 20 Java Exceptional Event Handling Dr. Martin O Connor CA166 www.computing.dcu.ie/~moconnor Topics What is an Exception? Exception Handler Catch or Specify Requirement Three Kinds of Exceptions

More information

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java COURSE DETAILS: CORE AND ADVANCE JAVA Core Java 1. Object Oriented Concept Object Oriented Programming & its Concepts Classes and Objects Aggregation and Composition Static and Dynamic Binding Abstract

More information

Sri Vidya College of Engineering & Technology

Sri Vidya College of Engineering & Technology UNIT-V TWO MARKS QUESTION & ANSWER 1. What is the difference between the Font and FontMetrics class? Font class is used to set or retrieve the screen fonts.the Font class maps the characters of the language

More information

Java Programming Course Overview. Duration: 35 hours. Price: $900

Java Programming Course Overview. Duration: 35 hours. Price: $900 978.256.9077 admissions@brightstarinstitute.com Java Programming Duration: 35 hours Price: $900 Prerequisites: Basic programming skills in a structured language. Knowledge and experience with Object- Oriented

More information

Class, Variable, Constructor, Object, Method Questions

Class, Variable, Constructor, Object, Method Questions Class, Variable, Constructor, Object, Method Questions http://www.wideskills.com/java-interview-questions/java-classes-andobjects-interview-questions https://www.careerride.com/java-objects-classes-methods.aspx

More information

(2½ hours) Total Marks: 75

(2½ hours) Total Marks: 75 (2½ hours) Total Marks: 75 N. B.: (1) All questions are compulsory. (2) Makesuitable assumptions wherever necessary and state the assumptions mad (3) Answers to the same question must be written together.

More information

An applet is a program written in the Java programming language that can be included in an HTML page, much in the same way an image is included in a

An applet is a program written in the Java programming language that can be included in an HTML page, much in the same way an image is included in a CBOP3203 An applet is a program written in the Java programming language that can be included in an HTML page, much in the same way an image is included in a page. When you use a Java technology-enabled

More information

5. In JAVA, is exception handling implicit or explicit or both. Explain with the help of example java programs. [16]

5. In JAVA, is exception handling implicit or explicit or both. Explain with the help of example java programs. [16] Code No: R05220402 Set No. 1 1. (a) java is freeform language. Comment (b) Describe in detail the steps involved in implementing a stand-alone program. (c) What are command line arguments? How are they

More information

CSSE 220 Day 19. Object-Oriented Design Files & Exceptions. Check out FilesAndExceptions from SVN

CSSE 220 Day 19. Object-Oriented Design Files & Exceptions. Check out FilesAndExceptions from SVN CSSE 220 Day 19 Object-Oriented Design Files & Exceptions Check out FilesAndExceptions from SVN A practical technique OBJECT-ORIENTED DESIGN Object-Oriented Design We won t use full-scale, formal methodologies

More information

STRUCTURING OF PROGRAM

STRUCTURING OF PROGRAM Unit III MULTIPLE CHOICE QUESTIONS 1. Which of the following is the functionality of Data Abstraction? (a) Reduce Complexity (c) Parallelism Unit III 3.1 (b) Binds together code and data (d) None of the

More information

Language Features. 1. The primitive types int, double, and boolean are part of the AP

Language Features. 1. The primitive types int, double, and boolean are part of the AP Language Features 1. The primitive types int, double, and boolean are part of the AP short, long, byte, char, and float are not in the subset. In particular, students need not be aware that strings are

More information

1Z Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions

1Z Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions 1Z0-850 Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-850 Exam on Java SE 5 and 6, Certified Associate... 2 Oracle 1Z0-850 Certification Details:...

More information