JAVA MULTIPLE CHOICE QUESTION.

Slides:



Advertisements
Similar presentations
Chapter 1: Computer Systems
Advertisements

IntroductionIntroduction  Computer program: an ordered sequence of statements whose objective is to accomplish a task.  Programming: process of planning.
The Java Programming Language
Outline Java program structure Basic program elements
1 Java (vs. C++). 2 Object-oriented Programming Java and C++ are the most popular object-oriented programming languages Java Sun Microsystems in 1990.
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Chapter 1 Introduction.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
CMSC 341 Introduction to Java Based on tutorial by Rebecca Hasti at
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
3.1 Documentation & Java Language Elements Purpose of documentation Assist the programmer with developing the program Assist other programers who.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
Prepared by Uzma Hashmi Instructor Information Uzma Hashmi Office: B# 7/ R# address: Group Addresses Post message:
University of Limerick1 Work with API’s. University of Limerick2 Learning OO programming u Learning a programming language can be broadly split into two.
1 Identifiers  Identifiers are the words a programmer uses in a program  An identifier can be made up of letters, digits, the underscore character (
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
Java Language and SW Dev’t
1 Computer Systems -- Introduction  Chapter 1 focuses on:  the structure of a Java application  basic program elements  preparing and executing a program.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
The Java Programming Language
Lecture 2 Object Oriented Programming Basics of Java Language MBY.
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
JAVA BASICS Prepared by The Smartpath Information Systems
Page: 1 การโปรแกรมเชิงวัตถุด้วยภาษา JAVA บุรินทร์ รุจจนพันธุ์.. ปรับปรุง 15 มิถุนายน 2552 Keyword & Data Type มหาวิทยาลัยเนชั่น.
Chapter 1: Introduction Java Programming Language How the Java Virtual Machine Works (compiling, etc…) Update by: Dan Fleck Coming up: The Java Programming.
1 Programming Java Java Basics. 2 Java Program Java Application Program Application Program written in general programming language Applet Program running.
Lecture 2 Software Concepts Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of Technology.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
Copyright Curt Hill Variables What are they? Why do we need them?
JAVA COURSE 1 Computer Engineering Association. Compile your first program Public class Hello{ public class Hello(){ System.out.println(“Hello”); } puclic.
Java Language Basics By Keywords Keywords of Java are given below – abstract continue for new switch assert *** default goto * package.
Developed at Sun Microsystems in 1991 James Gosling, initially named “OAK” Formally announced java in 1995 Object oriented and cant write procedural.
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
Classes, Interfaces and Packages
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
Quick Review of OOP Constructs Classes:  Data types for structured data and behavior  fields and methods Objects:  Variables whose data type is a class.
Java Computer Industry Lab. 1 Programming Java Java Basics Incheon Paik.
© 2011 Pearson Education, publishing as Addison-Wesley Chapter 1: Computer Systems Presentation slides for Java Software Solutions for AP* Computer Science.
Introduction to Java Programming by Laurie Murphy Revised 09/08/2016.
Java and C# - Some Commonalities Compile into machine-independent, language- independent code which runs in a managed execution environment Garbage Collection.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
1 Problem Solving  The purpose of writing a program is to solve a problem  The general steps in problem solving are: Understand the problem Dissect the.
C++ Lesson 1.
1. Introduction To JAVA.
Objects as a programming concept
Working with Java.
Chapter 4 Assignment Statement
Chapter No. : 1 Introduction to Java.
Lecture 2: Data Types, Variables, Operators, and Expressions
Internet and Java Foundations, Programming and Practice
University of Central Florida COP 3330 Object Oriented Programming
Java package classes Java package classes.
Chapter 3 Assignment Statement
Starting JavaProgramming
null, true, and false are also reserved.
Introduction to Java Programming
CS-0401 INTERMEDIATE PROGRAMMING USING JAVA
An overview of Java, Data types and variables
The Building Blocks Classes: Java class library, over 1,800 classes:
Chapter 1: Computer Systems
Units with – James tedder
Units with – James tedder
JavaScript Reserved Words
Focus of the Course Object-Oriented Software Development
Module 2 - Part 1 Variables, Assignment, and Data Types
Chap 2. Identifiers, Keywords, and Types
Agenda Types and identifiers Practice Assignment Keywords in Java
Presentation transcript:

JAVA MULTIPLE CHOICE QUESTION

Check your Knowledge Press to Start www.prolearninghub.com

1. Java was first developed in? 1990 1991 1993 1996 www.prolearninghub.com

2. Java is object oriented language? Yes No www.prolearninghub.com

3. The old name of java is? Oct Oak J language None of above www.prolearninghub.com

4. Java does not support: Multithreading Reflection Operator Overloading Garbage Collection www.prolearninghub.com

private synchronized int e 5. Which of the following class level (nonlocal) variable declarations will not compile? protected int a transient int b = 3 private synchronized int e volatile int d www.prolearninghub.com

6. Static functions can be accessed using null reference. True False www.prolearninghub.com

7. Java does not support Multiprogramming Operator overloading Inheritance Garbage collection www.prolearninghub.com

8. Abbreviation of JDK is: Java Data Kit Java Definition Kit Java Development Kit Java Design Kit www.prolearninghub.com

9. We can invoke any number of methods by one instance only True False www.prolearninghub.com

10. Abbreviation of AWT is Abstract Window Toolkit A Web Toolkit Application with types Absolutely Wonderful Kit www.prolearninghub.com

11. Which of the following is generated when the source code is successfully compiled? Output Byte code Error None of above www.prolearninghub.com

12. Process of converting typed code to machine code? Compilation Inheritance Polymorphism None www.prolearninghub.com

13. In java, if you do not give a value to a variable before using it, ______ It will contain a garbage value It will initialized with zero Compiler will give an error None of above www.prolearninghub.com

14. Which among the following is the compulsory section of java program? Package Statement Import Statement Documentation section Class declaration section www.prolearninghub.com

15. Sharing of common information is achieved by the concept of? polymorphism encapsulation inheritance none of above www.prolearninghub.com

16. ______ consist a data and methods? Variable Class Vectors None of these www.prolearninghub.com

17. Which JDK command is correct to run a Java application in ByteCode 17. Which JDK command is correct to run a Java application in ByteCode.class? java ByteCode java ByteCode.class javac ByteCode.java javac ByteCode www.prolearninghub.com

18. Java Virtual Machine is software that interprets Java byte code. Yes No www.prolearninghub.com

19. Java is also known as ____ stage language One Two Three Four www.prolearninghub.com

20. In java, if you do not give a value to a variable before using it, ______ It will contain a garbage value It will initialized with zero Compiler will give an error None of above www.prolearninghub.com

21. To interprets java code we use: Javap None of the above www.prolearninghub.com

22. Which one of these lists contains only Java programming language keywords? class, if, void, long, Int, continue goto, instanceof, native, finally, default, throws try, virtual, throw, final, volatile, transient strictfp, constant, super, implements, do www.prolearninghub.com

23. Javap mean: java compiler java interpreter java disassemble java debugger www.prolearninghub.com

24. Hot java is a: web browser system software IDE None of above www.prolearninghub.com

25. How many types of variables exist in java? 3 4 5 www.prolearninghub.com

26. Local variable declare: Inside the method Outside the method Both side None of above www.prolearninghub.com

27. Instance variable declare: Inside the method Inside the class but outside the method Outside the method Outside the class www.prolearninghub.com

28. Static variable is: Local Global Both None www.prolearninghub.com

29. How many bytes a Boolean has? 1 2 3 4 www.prolearninghub.com

30. Long has 8 bytes. True False www.prolearninghub.com

31. Float data-type deals with: Integer Fraction Decimal point None of above www.prolearninghub.com

32. Int data type has: 2 bytes 3 bytes 4 bytes 5 bytes www.prolearninghub.com

33. Default value for char data type is: ‘\0000’ www.prolearninghub.com

34. Which package contains String? Java.util Java.lang Java.rmi None www.prolearninghub.com

35. Which of the following is true about String? String is mutable. String is immutable. String is a data type. None of the above. www.prolearninghub.com

36. What is the default value of byte variable? 0.0 null Not defined www.prolearninghub.com

37. What is instance variable? Instance variables are static variables within a class but outside any method. Instance variables are variables defined inside methods, constructors or blocks. Instance variables are variables within a class but outside any method. None of the above www.prolearninghub.com

38. What kind of variables a class can consist of? class variables, instance variables class variables, local variables, instance variables class variables class variables, local variables www.prolearninghub.com

39. If result= 2+3*5, what is the value and type of ‘result’ variable? 17, bytes 25, bytes 17,int 25, int www.prolearninghub.com

40. Which of the following is the smallest integer data type ? Into long byte short www.prolearninghub.com

41. Which of the following is not a primitive data type? byte short enum Int www.prolearninghub.com

42. Which value cannot store character data type. Digit Special character String Letter www.prolearninghub.com

43. Range of byte data type is? -128 to 255 -128 to 256 -128 to 127 -127 to 128 www.prolearninghub.com

44. In order to fetch stream of data from network or file, following data type used? double char Into byte www.prolearninghub.com

45. 64 bits are stored by: double Into long float www.prolearninghub.com

46. What is the default value for “double” data type? 0.0 null 0.0d www.prolearninghub.com

47. What is the range of data type short in Java? -128 to 127 -32768 to 32767 -2147483648 to 2147483647 None of the mentioned www.prolearninghub.com

48. Which one of this value contains float data type? www.prolearninghub.com

49. Default value for Boolean data type is: True False 1 www.prolearninghub.com

50. ____ is a reference data type: int short double array www.prolearninghub.com

The Results