Assessment – Java Basics: Part 1

Slides:



Advertisements
Similar presentations
Topic 10 Java Memory Management. 1-2 Memory Allocation in Java When a program is being executed, separate areas of memory are allocated for each class.
Advertisements

Web Application Development Slides Credit Umair Javed LUMS.
CS0007: Introduction to Computer Programming Introduction to Classes and Objects.
Evan Korth New York University Computer Science I Classes and Objects Professor: Evan Korth New York University.
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Introduction to Java Programming, 4E Y. Daniel Liang.
BPJ444: Business Programming Using Java Classes and Objects Tim McKenna
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
CSC Programming I Lecture 8 September 9, 2002.
Java Classes Appendix C © 2015 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
CS212: Object Oriented Analysis and Design Lecture 6: Friends, Constructor and destructors.
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
Lecture # 8 Constructors Overloading. Topics We will discuss the following main topics: – Static Class Members – Overloaded Methods – Overloaded Constructors.
Review of ICS 102. Lecture Objectives To review the major topics covered in ICS 102 course Refresh the memory and get ready for the new adventure of ICS.
Chapter 10 Classes and Objects: A Deeper Look Visual C# 2010 for Programmers © by Pearson Education, Inc. All Rights Reserved.
Java Objects and Classes. Overview n Creating objects that belong to the classes in the standard Java library n Creating your own classes.
 Classes in c++ Presentation Topic  A collection of objects with same properties and functions is known as class. A class is used to define the characteristics.
Defining Classes II. Today’s topics  Static methods  Static variables  Wrapper classes  References  Class parameters  Copy constructor.
RECITATION 4. Classes public class Student { } Data Members public class Student { private String name; public String id; }
Visual C# 2012 for Programmers © by Pearson Education, Inc. All Rights Reserved.
More C++ Features True object initialisation
C# Classes and Inheritance CNS 3260 C#.NET Software Development.
Lecture 3 Classes, Structs, Enums Passing by reference and value Arrays.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 26 - Java Object-Based Programming Outline 26.1Introduction.
 Constructor  Finalize() method  this keyword  Method Overloading  Constructor Overloading  Object As an Argument  Returning Objects.
Introduction to Java Chapter 7 - Classes & Object-oriented Programming1 Chapter 7 Classes and Object-Oriented Programming.
Classes: user-defined types. Organizing method with a class A class is used to organize methods * Methods that compute Mathematical functions * The Scanner.
COP3502 Programming Fundamentals for CIS Majors 1 Instructor: Parisa Rashidi.
Classes. Constructor A constructor is a special method whose purpose is to construct and initialize objects. Constructor name must be the same as the.
Finalizers, this reference and static Sangeetha Parthasarathy 06/13/2001.
Chapter 10: Classes and Data Abstraction. Objectives In this chapter, you will: Learn about classes Learn about private, protected, and public members.
Static. 2 Objectives Introduce static keyword –examine syntax –describe common uses.
Objects and Variables Local variables – Confined to single context: allocated on stack – Primitive types such as int or object references – Must be initialized.
CSI 3125, Preliminaries, page 1 Class. CSI 3125, Preliminaries, page 2 Class The most important thing to understand about a class is that it defines a.
CMSC 202 Advanced Section Classes and Objects: Object Creation and Constructors.
CS 139 Objects Based on a lecture by Dr. Farzana Rahman Assistant Professor Department of Computer Science.
Chapter 10: Classes and Data Abstraction. Classes Object-oriented design (OOD): a problem solving methodology Objects: components of a solution Class:
Chapter 1 C++ Basics Review (Section 1.4). Classes Defines the organization of a data user-defined type. Members can be  Data  Functions/Methods Information.
5.1 Basics of defining and using classes A review of class and object definitions A class is a template or blueprint for an object A class defines.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Object Based Programming Chapter 8. 2 Contrast ____________________ Languages –Action oriented –Concentrate on writing ________________ –Data supports.
Topic: Classes and Objects
Java Basics Classes and Objects.
Objects as a programming concept
JAVA MULTIPLE CHOICE QUESTION.
Static data members Constructors and Destructors
Objects as a programming concept
Friend Class Friend Class A friend class can access private and protected members of other class in which it is declared as friend. It is sometimes useful.
Haidong Xue Summer 2011, at GSU
Intro To Classes Review
University of Central Florida COP 3330 Object Oriented Programming
Class Operations Pointer and References with class types
Class: Special Topics Copy Constructors Static members Friends this
Defining Classes II.
Object Based Programming
CSC 113 Tutorial QUIZ I.
Using Classes and Objects
Lists in Python.
Simple Classes in C# CSCI 293 September 12, 2005.
Classes & Objects: Examples
Object Oriented Programming in java
Arrays.
Chapter 6 Objects and Classes
Arrays in Java.
Assessment – Java Basics: Part 2
Chapter 6 Objects and Classes
Class: Special Topics Overloading (methods) Copy Constructors
String Class.
Classes and Objects Object Creation
CMSC 202 Constructors Version 9/10.
Presentation transcript:

Assessment – Java Basics: Part 1 The quiz contains 10 questions. You will have one attempt to answer each question. You can exit the quiz at any time. If you exit the quiz without completing all 10 questions, on return you will have to start the quiz from the beginning. Scoring 80% or higher means you have understood the topic well. Start www.prolearninghub.com

If we do not specify access modifier to any member of class, which of the following is automatically assigned to it? public default protected www.prolearninghub.com

Java Strings are also objects. True False www.prolearninghub.com

What happens with objects which are not referenced? They are kept in memory They are Garbage Collected They are moved to Secondary memory www.prolearninghub.com

In Java, String objects are mutable? True False www.prolearninghub.com

What is the initial value of any Reference Variable? 1 null www.prolearninghub.com

Identify the incorrect statement regarding static method Accessed using class name.method name Is not a class method Creation of instance not necessary for using static method www.prolearninghub.com

Which of the following initializes an object? Constructor Garbage Collector Destructor www.prolearninghub.com

A class is created with which of the following keyword? struct enum www.prolearninghub.com

A programmer want to print number of command line arguments passed A programmer want to print number of command line arguments passed. How he will achieve this? Using length property of array Using length method of array Using len method of array www.prolearninghub.com

Identify the incorrect statement regarding static variable Belong to a Class A single copy to be shared by all instances of the class Creation of instance is necessary for using static variables www.prolearninghub.com

The Results