Java Application Development

Similar documents
Selected Questions from by Nageshwara Rao

PROGRAMMING FUNDAMENTALS

COMPUTER EDUCATION TECHNIQUES, INC. (COBOL_QUIZ- 4.8) SA:

Selected Java Topics

CS260 Intro to Java & Android 03.Java Language Basics

Object Oriented Modeling

ASP.NET: Hands-on Introduction

Object-oriented programming. and data-structures CS/ENGRD 2110 SUMMER 2018

CS/B.TECH/CSE(New)/SEM-5/CS-504D/ OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 GROUP A. (Multiple Choice Type Question)

Introduction to Programming Using Java (98-388)

CompSci 125 Lecture 11

Java Simple Data Types

CSC Java Programming, Fall Java Data Types and Control Constructs

Fundamentals of Programming Data Types & Methods

Contents. 8-1 Copyright (c) N. Afshartous

Introduction to Java

Outline. Java Models for variables Types and type checking, type safety Interpretation vs. compilation. Reasoning about code. CSCI 2600 Spring

INDEX. A SIMPLE JAVA PROGRAM Class Declaration The Main Line. The Line Contains Three Keywords The Output Line

Operators in java Operator operands.

C212 Early Evaluation Exam Mon Feb Name: Please provide brief (common sense) justifications with your answers below.

Lecture 14. 'for' loops and Arrays

15CS45 : OBJECT ORIENTED CONCEPTS

CS-211 Fall 2017 Test 1 Version A Oct. 2, Name:

Winter Compiler Construction Who. Mailing list and forum

Computer Programming, I. Laboratory Manual. Final Exam Solution

1 Lexical Considerations

Topic 5: Enumerated Types and Switch Statements

Declarations and Access Control SCJP tips

(A) 99 ** (B) 100 (C) 101 (D) 100 initial integers plus any additional integers required during program execution

Key Java Simple Data Types

INHERITANCE. Spring 2019

AP Computer Science Chapter 10 Implementing and Using Classes Study Guide

Computational Expression

1. [3 pts] What is your section number, the period your discussion meets, and the name of your discussion leader?

Points To Remember for SCJP

Class, Variable, Constructor, Object, Method Questions

CIS 265/506 Exam1 Spring 2012 Prof. V. Matos Exam Last Name First Name:

Programming Languages and Techniques (CIS120)

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

CS 231 Data Structures and Algorithms, Fall 2016

CS11 Java. Fall Lecture 1

IC Language Specification

CSC207H: Software Design. Java + OOP. CSC207 Winter 2018

Overriding המחלקה למדעי המחשב עזאם מרעי אוניברסיטת בן-גוריון

Computational Expression

Object-Oriented Programming. Topic 2: Fundamental Programming Structures in Java

SEMANTIC ANALYSIS TYPES AND DECLARATIONS

CSCI 135 Exam #2 Fundamentals of Computer Science I Fall 2013

Introduction to Programming (Java) 2/12

Java Applets. Last Time. Java Applets. Java Applets. First Java Applet. Java Applets. v We created our first Java application

Class definition. complete definition. public public class abstract no instance can be created final class cannot be extended

Lab5. Wooseok Kim

cis20.1 design and implementation of software applications I fall 2007 lecture # I.2 topics: introduction to java, part 1

Inheritance. Inheritance allows the following two changes in derived class: 1. add new members; 2. override existing (in base class) methods.

C++ (classes) Hwansoo Han

Language Reference Manual

Java Simple Data Types

CS/B.TECH/CSE(OLD)/SEM-6/CS-605/2012 OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Certified Core Java Developer VS-1036

CS 177 Spring 2010 Exam I

CSE115 / CSE503 Introduction to Computer Science I. Dr. Carl Alphonce 343 Davis Hall Office hours:

1 Shyam sir JAVA Notes

CMPS 134: Computer Science I Fall 2011 Test #1 October 5 Name Dr. McCloskey

Inheritance. Lecture 11 COP 3252 Summer May 25, 2017

THE CATHOLIC UNIVERSITY OF EASTERN AFRICA A. M. E. C. E. A

CS313D: ADVANCED PROGRAMMING LANGUAGE

Data and Variables. Data Types Expressions. String Concatenation Variables Declaration Assignment Shorthand operators. Operators Precedence

(A) 99 (B) 100 (C) 101 (D) 100 initial integers plus any additional integers required during program execution

Sequence structure. The computer executes java statements one after the other in the order in which they are written. Total = total +grade;

CMPS 12A - Winter 2002 Final Exam A March 16, Name: ID:

1.00 Lecture 4. Promotion

OCA Java SE 7 Programmer I Certification Guide By Mela Gupta. Arrays

Chapter 1: Introduction to Computers, Programs, and Java

Question: Total Points: Score:

Lexical Considerations

Java Basic Programming Constructs

In Java, data type boolean is used to represent Boolean data. Each boolean constant or variable can contain one of two values: true or false.

Following is the general form of a typical decision making structure found in most of the programming languages:

Midterm Exam CS 251, Intermediate Programming October 8, 2014

5/23/2015. Core Java Syllabus. VikRam ShaRma

1 Method Signatures and Overloading (3 minutes, 2 points)

OBJECTS AND CLASSES CHAPTER. Final Draft 10/30/2011. Slides by Donald W. Smith TechNeTrain.com

COMP200 - Object Oriented Programming: Test One Duration - 60 minutes

Lec 3. Compilers, Debugging, Hello World, and Variables

CE221 Programming in C++ Part 1 Introduction

Practice with variables and types

AP CS Unit 6: Inheritance Notes

Static, Final & Memory Management

COE318 Lecture Notes Week 6 (Oct 10, 2011)

By: Abhishek Khare (SVIM - INDORE M.P)

Chapters 1-4 Summary. Syntax - Java or C? Syntax - Java or C?

Introduction To C#.NET

Lecture 8 Classes and Objects Part 2. MIT AITI June 15th, 2005

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

switch case Logic Syntax Basics Functionality Rules Nested switch switch case Comp Sci 1570 Introduction to C++

LECTURE 2 (Gaya College of Engineering)

CSE 8B Final Exam Fall 2015

1. Find the output of following java program. class MainClass { public static void main (String arg[])

SEAL Project Proposal

Transcription:

In order to learn which questions have been answered correctly: 1. Print these pages. 2. Answer the questions. 3. Send this assessment with the answers via: a. FAX to (212) 967-3498. Or b. Mail the answers to the following address: Client contact: SYS-ED PO Box 1213 New York, NY 10156 Name: Company: Address: City, State, Zip: Phone Number: Fax Number: E-mail: COMPUTER EDUCATION TECHNIQUES, INC. (JAVA_APPS_DEV - 4.8) SA: Page 1

1. Which is not a valid comment in the Java programming language? a. // a comment b. /* */ c. /** */ d. <!-- --> e. REM 2. Data in the Java programming language is strongly typed. 3. What is the value of seasons.length for the following array? String[] seasons = {"winter", "spring", "summer", "fall", ; a. undefined b. 3 c. 4 d. 5 e. 6 4. When the new keyword is used for creating an object, where is it created? a. Heap b. Garbage collector c. Queue d. Stack e. None of the above. 5. Which of the following loop constructs must execute their loop body at least once? a. while (<boolean-expression>) b. do while (<boolean-expression>); c. for (<init-stmts>...; <boolean-expression>; <exprs>...) d. All of the above. e. None of the above. 6. An overridden method can be in the same class. a. True b. False COMPUTER EDUCATION TECHNIQUES, INC. (JAVA_APPS_DEV - 4.8) SA: Page 2

7. Which of the following datatypes consumes the most bits when representing its range of values? a. boolean b. float c. long d. char e. They all consume the same amount of bits. 8. How is the garbage collector forced to run? a. Call System.gc() b. Call Runtime.gc() c. Call System.cg() d. Either a or b e. There is nothing you can do. 9. When multiple methods exist within the same class with different method signatures, this is known as: a. Method overloading b. Overriding methods c. Message passing d. Method Cloning e. A headache 10. What is printed when the program is executed; the ASCII value of A is 65: class PrintMe { public void do(int character) { System.out.println(character+character); public static void main (String args[]) { new PrintMe().do('A'); a. AA b. 130 c. A d. 6565 e. Does not compile 11. Instance variables maintain: a. One copy of the variable for each class instance. b. A separate value for the state information for each class instance. c. A constant state of the variable for each class instance. e. All of the above. COMPUTER EDUCATION TECHNIQUES, INC. (JAVA_APPS_DEV - 4.8) SA: Page 3

12. The following code includes a class variable and an instance method: public class Counter { int count; void incrementcount() { count++; int getcount() { return count; 13. In order to create a class level constant, the following two keywords need to be used together: a. Public and constant. b. Final and constant. c. Final and static. d. Class and constant. e. Public and constant. 14. Static methods are called: a. With the class identifier. b. With a new instance of the class. c. a and b. d. Stat methods can never be called. 15. What results would print from the following code snippet: System.out.println("12345 ".valueof(54321)); a. The application won't compile. b. 12345 54321 c. 54321 d. 12345 e. 13542 16. Instance variables maintain: a. One copy of the variable for each class instance. b. A separate value for the state information for each class instance. c. A constant state of the variable for each class instance. e. All of the above 17. The following code includes a class variable and an instance method: public class Counter { int count; void incrementcount() { count++; int getcount() { return count; COMPUTER EDUCATION TECHNIQUES, INC. (JAVA_APPS_DEV - 4.8) SA: Page 4

18. In order to create a class level constant, use the following two keywords together: a. Public and constant. b. Final and constant. c. Final and static. d. Class and constant. e. Public and constant. 19. Static methods are called: a. With the class identifier. b. With a new instance of the class. c. a and b d. Static methods can never be called. 20. What results would print from the following code snippet: System.out.println("12345 ".valueof(54321)); a. The application won't compile. b. 12345 54321 c. 54321 d. 12345 e. 13542 COMPUTER EDUCATION TECHNIQUES, INC. (JAVA_APPS_DEV - 4.8) SA: Page 5