This document contains a 10 question multiple choice quiz about Java programming concepts. The questions cover topics like class and file naming conventions, access modifiers, constructors, instantiation, bytecode, garbage collection, and method calls. For each question there are 5 possible answers labeled A through E, and the correct answer is worth 1 point.
Java history, versions, types of errors and exception, quiz SAurabh PRajapati
this ppt contains history and basic facts of object oriented programming language java, difference between JIT, JVM, JRE and JDK. it also having information about different versions of java. advantages over other language, difference between error and exception with its types is also included. explanation of final variable and string to int conversation is also added. in the end some twisted question of it which sharpen the knowledge of its basic are added. beyond this some programming examples with output is there too. hope u find it useful...!! thanku..!!
Java history, versions, types of errors and exception, quiz SAurabh PRajapati
this ppt contains history and basic facts of object oriented programming language java, difference between JIT, JVM, JRE and JDK. it also having information about different versions of java. advantages over other language, difference between error and exception with its types is also included. explanation of final variable and string to int conversation is also added. in the end some twisted question of it which sharpen the knowledge of its basic are added. beyond this some programming examples with output is there too. hope u find it useful...!! thanku..!!
In this presentation, inheritance is explained with the help of java coding and also narrow and widening in java. and why the multiple inheritances not supported in java
Behandlingsskolernes dagskoler har fået deres egne hjemmesiderBehandlingsskolerne
Behandlingsskolernes syv dagskoler for børn og unge har nu fået hver deres egen hjemmeside:
www.barometeret.dk
www.fyrtaarnet.dk
www.skolen-karlsvognen.dk
www.pilelygaard.dk
www.skolen-pilen.dk
www.kompasset.dk
www.skolen-polaris.dk
In this presentation, inheritance is explained with the help of java coding and also narrow and widening in java. and why the multiple inheritances not supported in java
Behandlingsskolernes dagskoler har fået deres egne hjemmesiderBehandlingsskolerne
Behandlingsskolernes syv dagskoler for børn og unge har nu fået hver deres egen hjemmeside:
www.barometeret.dk
www.fyrtaarnet.dk
www.skolen-karlsvognen.dk
www.pilelygaard.dk
www.skolen-pilen.dk
www.kompasset.dk
www.skolen-polaris.dk
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...yazad dumasia
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and Inheritance , Exploring the Base Class Library -, Debugging and Error Handling , Data Types full knowledge about basic of .NET Framework
Object-oriented programming (OOP) with Complete understanding modulesDurgesh Singh
Object-oriented programming (OOP) is the core ingredient of the .NET framework. OOP is so important that, before embarking on the road to .NET, you must understand its basic principles and terminology to write even a simple program. The fundamental idea behind OOP is to combine into a single unit both data and the methods that operate on that data; such units are called an object. All OOP languages provide mechanisms that help you implement the object-oriented model. They are encapsulation, inheritance, polymorphism and reusability. Let's now take a brief look at these concepts.
Detailed presentation on Inheritance and interfaces in JAVA. Presentation includes suitable example for better understanding the concepts such as Overriding in java and also keywords such as FINAL and SUPER.
1. CSC142 – Quiz 1 1
Multiple Choice Questions (10 points)
Answer all of the following questions. READ EACH QUESTION
CAREFULLY. Fill the correct bubble on your scantron sheet.
Each correct answer is worth 1 point. Each question has
EXACTLY one correct answer.
Consider the following program:
import myLibrary.*;
public class ShowSomeClass
{
// code for the class...
}
What is the name of the java file containing this program?
A. myLibrary.java
B. ShowSomeClass.java
C. ShowSomeClass
D. ShowSomeClass.class
1.
E. Any file name with the java suffix will do
Which of the following is TRUE?
A. In java, an instance field declared public generates a compilation error.
B. int is the name of a class available in the package java.lang
C. Instance variable names may only contain letters and digits.
D. A class has always a constructor (possibly automatically supplied by the java
compiler).
2.
E. The more comments in a program, the faster the program runs.
Consider the following code snippet
String river = new String(“Columbia”);
System.out.println(river.length());
What is printed?
A. 6
B. 7
C. 8
D. Columbia
3.
E. river
2. CSC142 – Quiz 1 2
A constructor
A. must have the same name as the class it is declared within.
B. is used to create objects.
C. may be declared private
D. A and B
4.
E. A, B and C
Which of the following may be part of a class definition?
A. instance variables
B. instance methods
C. constructors
D. all of the above
5.
E. none of the above
What is different between a Java applet and a Java application?
A. An application can in general be trusted whereas an applet can't.
B. An applet must be executed in a browser environment.
C. An applet is not able to access the files of the computer it runs on
D. (A), (B) and (C).
6.
E. None of the above
Consider
public class MyClass{
public MyClass(){/*code*/}
// more code...
}
To instantiate MyClass, you would write?
A. MyClass mc = new MyClass();
B. MyClass mc = MyClass();
C. MyClass mc = MyClass;
D. MyClass mc = new MyClass;
7.
E. It can't be done. The constructor of MyClass should be defined as
public void MyClass(){/*code*/}
What is byte code in the context of Java?
A. The type of code generated by a Java compiler
B. The type of code generated by a Java Virtual Machine
C. It is another name for a Java source file
D. It is the code written within the instance methods of a class.
8.
E. It is another name for comments written within a program.
3. CSC142 – Quiz 1 3
What is garbage collection in the context of Java?
A. The operating system periodically deletes all of the java files available on the
system.
B. Any package imported in a program and not used is automatically deleted.
C. When all references to an object are gone, the memory used by the object is
automatically reclaimed.
D. The JVM checks the output of any Java program and deletes anything that
doesn't make sense.
9.
E. Janitors working for Sun MicroSystems are required to throw away any
Microsoft documentation found in the employees' offices.
You read the following statement in a Java program that compiles and
executes.
submarine.dive(depth);
What can you say for sure?
A. depth must be an int
B. dive must be a method.
C. dive must be the name of an instance field.
D. submarine must be the name of a class
10.
E. submarine must be a method.