Java REPL Tutorial. -> System.out.println("Hi"); Hi

Size: px
Start display at page:

Download "Java REPL Tutorial. -> System.out.println("Hi"); Hi"

Transcription

1 Java REPL Tutorial Introduction The Java REPL (Read-Evaluate-Print-Loop) is a command line tool that facilitates exploratory programming by providing interactive use of Java Programming Language elements. It is ideal both for learning the Java language and exploring unfamiliar code (include new Java APIs). Typical Java development means writing a complete program, then compile it (fixing any errors), the running it, figuring out what is wrong, editing, and repeating. With the Java REPL you can enter program elements one at a time, immediately seeing the result and adjusting accordingly. During development, code can be pasted into the REPL, and/or working code pasted from the REPL into a program editor. Getting Started The REPL accepts Java statements, variable, method, and class definitions, imports, and expressions. I'll refer to these pieces of Java code as snippets. For example, you can enter a statement at the prompt, any side-effects will take place and any output displayed (what the user types in italics): -> System.out.println("Hi"); Hi -> By default, the REPL will give you descriptive information about what you enter. Here, a variable is defined: -> int x = 45 Added variable x of type int with initial value 45 Note that terminating semicolons will be automatically added if missing. When an expression is entered, a temporary variable is created so that the value can be referenced later: -> Expression value is: 4 assigned to temporary variable $1 of type int When the REPL detects that an entry is incomplete, it prompts for more, as in this method definition: -> String twice(string s) { >> return s + s; Added method twice -> twice("ocean") Expression value is: "OceanOcean" assigned to temporary variable $2 of type String Commands The Java REPL has a number of commands for settings and to display information. They are distinguished from snippets by a leading slash. You can get information on the current variables, methods, and classes with the /vars, /methods, and /classes commands. You can get a list of entered snippets with the /list command. For example: -> /vars int x = 45 int $1 = 4 String $2 = "OceanOcean"

2 -> /methods twice (Ljava/lang/String;)Ljava/lang/String; printf (Ljava/lang/String;[Ljava/lang/Object;)V -> /list 9 : System.out.println("Hi") 10 : int x = 45; 11 : : String twice(string s) { return s + s; 13 : twice("ocean") You will note that the types and values of variables, and the type signature of methods are displayed. You might also note that the listing starts at snippet 9 and that there is a method which we did not define. This is because the REPL has start-up entries that are silently and automatically executed before the REPL starts, so that you can get to work quickly. These aren't listed unless you request to see them with /list all : -> /list all 1 : import java.util.*; 2 : import java.io.*; 3 : import java.math.*; 4 : import java.net.*; 5 : import java.util.concurrent.*; 6 : import java.util.prefs.*; 7 : import java.util.regex.*; 8 : void printf(string format, Object... args) { System.out.printf(format, args); 9 : System.out.println("Hi") 10 : int x = 45; 11 : : String twice(string s) { return s + s; 13 : twice("ocean") Several common imports and a handy printf method are the default start-up entries. You can personalize your start-up entries with the /setstart command (whose argument is a file name to read), all subsequent invocations of the REPL will use the entries you specified. The /savestart is useful if you wish to create your file as a variant to the default startup. Use /help for a list of commands. Note that most commands have a one character shortcut, for example /l for list. Other important commands include /exit to leave the REPL, /save to save your snippets, /open to read them back in, and /classpath to add to the paths that will be searched for referenced classes. You may have noticed that the REPL is quite chatty, you can set the amount and format of output with the /feedback command, for example /feedback concise. If you plan to primarily use the REPL by pasting from other windows, you may wish to toggle off the prompt with /prompt. Changing Definitions To change the definition of a variable, method, or class you have previously entered, simply enter a new definition. For example, the method we defined above can get new new definition: -> String twice(string s) { >> return "Twice:" + s; Modified method twice -> twice("thing") Expression value is: "Twice:thing" assigned to temporary variable $3 of type String

3 Note that rather than saying Added method, as before, it says Modified method -- this means that the definition was changed, but has the same signature, and thus all existing usages continue to be valid. You may also change definitions in incompatible ways. For example: -> String x Replaced variable x of type String We have changed the type of the variable x, note that it now says Replaced. More on this later. Forward Reference Because a goal of the REPL is to support exploratory programming (and because some forms of programming require it), the REPL allows you to define methods whose bodies reference methods, variables, or classes which are not yet defined. Let's say you wish to define a method for the volume of a sphere, you can enter the formula: -> double volume(double radius) { >> return 4.0 / 3.0 * PI * cube(radius); Added method volume, however, it cannot be invoked until method cube(double), and variable PI are declared The REPL allows the definition but warns of what is yet to be defined. The definition may be referenced, but if execution is attempted, it will fail: -> double PI = Added variable PI of type double with initial value Attempted to call volume which cannot be invoked until method cube(double) is declared. -> double cube(double x) { return x * x * x; Added method cube Expression value is: assigned to temporary variable $2 of type double With all definitions in place, volume now works. I'll use this code to illustrate more about incompatible replacement. Let's say you aren't happy with the precision of PI: -> BigDecimal PI = new BigDecimal(" ") Replaced variable PI of type BigDecimal with initial value This is incompatible with the definition of volume(), but, by default, no warning will be displayed until the code is executed this is to prevent flurries of uninteresting updates. You can see this information with /feedback verbose. Executed the volume() method will display the issue: Attempted to call volume which cannot be invoked until this error is addressed -- bad operand types for binary operator '*' first type: double second type: java.math.bigdecimal return 4.0 / 3.0 * PI * cube(radius); ^ ^

4 History The REPL maintains a history of snippets and commands. You navigate this history to re-enter or edit prior input with the up/down/left/right arrows. Entered text will be inserted. The Delete key can be used to delete text. Press the Enter key to accept the history line again (modified or not). You can move a snippet at a time by using control-up and control-down (that is holding the control key while pressing the up or down key). Tab Completion Press the tab key to complete the current entry. For example: vol<tab> Will be replaced with: volume( If there is more than one completion the set of completions will be listed. Editors This feature is being actively explored. Feedback much appreciated. Final feature very likely to be different. To more easily edit past entries, particularly one's of many lines, you can invoke an editor on the snippet by providing its name or id (number in /list): /edit volume Or, for all snippets and to enter new ones, /edit without an argument. When you save in the editor, any snippet that is changed or new will be entered, you will see the feedback from the snippets in the REPL window however there will be no REPL prompt and you cannot enter commands or snippets in the REPL window until the editor is closed. If you do not specify an editor, an internal editor will be provided. Specify the editor to invoke with the /seteditor command. The argument to the command is the external editor you wish to use. This editor must open its own window. For example: -> /seteditor kwrite Editor set to: kwrite -- note: editor MUST run in its own window -> /edit... user defines x in the external editor window and selects save... Added variable x of type int with initial value 6... user closes the external editor... ->

5 Exceptions In an exception backtrace, a location within REPL entered code is displayed as the #id/linenumber, where snippet id is the number displayed in /list and linenumber is the linenumber within the snippet. So, below, the exception occurs in snippet #9 aka divide() on the second line of divide: -> int divide(int x, int y) { >> return x / y; Added method divide -> divide(5, 0) java.lang.arithmeticexception thrown: / by zero at divide (#9:2) at (#10:1) -> /list 9 : int divide(int x, int y) { return x / y; 10 : divide(5, 0)

Borland C++ Compiler: Hello World Program

Borland C++ Compiler: Hello World Program Introduction Borland C++ Compiler: Hello World Program This article explains how to display text in a console program using the Borland C++ Compiler. The hello program writes Hello World to the console.

More information

Object-Oriented Programming in Java

Object-Oriented Programming in Java CSCI/CMPE 3326 Object-Oriented Programming in Java Class, object, member field and method, final constant, format specifier, file I/O Dongchul Kim Department of Computer Science University of Texas Rio

More information

Java Interview Questions and Answers

Java Interview Questions and Answers 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 and compile the java

More information

THE JAVA API. Some of the Java API Packages Package Theme Some Classes Within It. Classes that provide helpful utilities

THE JAVA API. Some of the Java API Packages Package Theme Some Classes Within It. Classes that provide helpful utilities THE JAVA API The Java API which stands for Application Programming Interface is a repository of prewritten classes provided by the creators of Java to enhance its usefulness. There are classes for creating

More information

This document shows how to use BlueJ to debug a Java program. We will use the SyllableCounter program in Chapter 6 as example.

This document shows how to use BlueJ to debug a Java program. We will use the SyllableCounter program in Chapter 6 as example. This document shows how to use BlueJ to debug a Java program. We will use the SyllableCounter program in Chapter 6 as example. Let s first execute the program to see that there are bugs in the program.

More information

Practice Fusion API Client Installation Guide for Windows

Practice Fusion API Client Installation Guide for Windows Practice Fusion API Client Installation Guide for Windows Quickly and easily connect your Results Information System with Practice Fusion s Electronic Health Record (EHR) System Table of Contents Introduction

More information

JetBrains ReSharper 2.0 Overview Introduction ReSharper is undoubtedly the most intelligent add-in to Visual Studio.NET 2003 and 2005. It greatly increases the productivity of C# and ASP.NET developers,

More information

Department of Computer Science Using Microsoft Visual C++ Version 6 By Andreas Grondoudis

Department of Computer Science Using Microsoft Visual C++ Version 6 By Andreas Grondoudis Department of Computer Science Using Microsoft Visual C++ Version 6 By Andreas Grondoudis INTRODUCTION...2 THE IDE, IT S FILES AND TOOLS...2 YOUR FILES FOR ANY 325 PIECE OF WORK USING V6...3 STARTING WITH

More information

Vim, Emacs, and JUnit Testing. Audience: Students in CS 331 Written by: Kathleen Lockhart, CS Tutor

Vim, Emacs, and JUnit Testing. Audience: Students in CS 331 Written by: Kathleen Lockhart, CS Tutor Vim, Emacs, and JUnit Testing Audience: Students in CS 331 Written by: Kathleen Lockhart, CS Tutor Overview Vim and Emacs are the two code editors available within the Dijkstra environment. While both

More information

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Exam Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) The JDK command to compile a class in the file Test.java is A) java Test.java B) java

More information

JDK 1.5 Updates for Introduction to Java Programming with SUN ONE Studio 4

JDK 1.5 Updates for Introduction to Java Programming with SUN ONE Studio 4 JDK 1.5 Updates for Introduction to Java Programming with SUN ONE Studio 4 NOTE: SUN ONE Studio is almost identical with NetBeans. NetBeans is open source and can be downloaded from www.netbeans.org. I

More information

Learning to Run a C Program With CodeWarrior (Adapted From MetroWerks)

Learning to Run a C Program With CodeWarrior (Adapted From MetroWerks) Computer Science 1 Fall, 1998 Prof. Kugel Learning to Run a C Program With CodeWarrior (Adapted From MetroWerks) Introduction The purpose of this tutorial is to show you how to use CodeWarrior to enter

More information

IN THIS CHAPTER,YOU ARE INTRODUCED to the C language so that you can see what

IN THIS CHAPTER,YOU ARE INTRODUCED to the C language so that you can see what 3 Compiling and Running Your First Program IN THIS CHAPTER,YOU ARE INTRODUCED to the C language so that you can see what programming in C is all about.what better way to gain an appreciation for this language

More information

modifier returnvaluetype methodname(list of parameters) { // Method body; }

modifier returnvaluetype methodname(list of parameters) { // Method body; } JAVA METHODS METHODS A Java method is similar to function in C/C++. It is a collection of statements that are grouped together to perform an operation. When you call the System.out.println method, for

More information

1001ICT Introduction To Programming Lecture Notes

1001ICT Introduction To Programming Lecture Notes 1001ICT Introduction To Programming Lecture Notes School of Information and Communication Technology Griffith University Semester 2, 2015 1 3 A First MaSH Program In this section we will describe a very

More information

Introduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved.

Introduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved. 1 2 Introduction to Java Applications 2.2 First Program in Java: Printing a Line of Text 2 Application Executes when you use the java command to launch the Java Virtual Machine (JVM) Sample program Displays

More information

behavior objects can specify operations that produce useful results to the user of the object

behavior objects can specify operations that produce useful results to the user of the object 33 Chapter 4 Objects: Packaging Computation Java is an object-oriented language. This means useful work is done through computational elements called objects. A variable is an instance of a type, such

More information

User-defined Functions (UDFs)

User-defined Functions (UDFs) User-defined Functions (UDFs) In this lecture I will be introducing the programmation language Visual Basic for Applications (VBA) and explaining one particular use of it: creating UDFs. VBA is a powerful

More information

Brief UNIX Introduction (adapted from C. Swanson, "Unix Tutorial") CSci 1113, Spring 2016 Lab 00. Introduction to UNIX and C++

Brief UNIX Introduction (adapted from C. Swanson, Unix Tutorial) CSci 1113, Spring 2016 Lab 00. Introduction to UNIX and C++ CSci 1113, Spring 2016 Lab 00 Introduction to UNIX and C++ Welcome to the first lab in CSci 1113. In this lab you will explore some computational resources needed during this course, and write a few short

More information

How to Write a Simple Makefile

How to Write a Simple Makefile Chapter 1 CHAPTER 1 How to Write a Simple Makefile The mechanics of programming usually follow a fairly simple routine of editing source files, compiling the source into an executable form, and debugging

More information

Common Errors in C. David Chisnall. February 15, 2011

Common Errors in C. David Chisnall. February 15, 2011 Common Errors in C David Chisnall February 15, 2011 The C Preprocessor Runs before parsing Allows some metaprogramming Preprocessor Macros Are Not Functions The preprocessor performs token substitution

More information

Creating a Java application using Perfect Developer and the Java Develo...

Creating a Java application using Perfect Developer and the Java Develo... 1 of 10 15/02/2010 17:41 Creating a Java application using Perfect Developer and the Java Development Kit Introduction Perfect Developer has the facility to execute pre- and post-build steps whenever the

More information

PE1 Worksheet. 3) What are the three control structures for writing an algorithm in pseudocode?

PE1 Worksheet. 3) What are the three control structures for writing an algorithm in pseudocode? PE1 Worksheet Problem solving 1) What are the four stages of problem solving by programming? What shall be done in each stage? Stage 1: Stage 2: Stage 3: Stage 4: 2) What is the top-down design strategy

More information

Java: Primitive Data Types, Variables and Constants

Java: Primitive Data Types, Variables and Constants Java: Primitive Data Types, Variables and Constants Introduction A primitive data type is a data type provided as a basic building block by a programming language. It is predefined by the programming language

More information

Introduction to C Programming

Introduction to C Programming Introduction to C Programming C HOW TO PROGRAM, 6/E 1992-2010 by Pearson Education, Inc. All Rights Reserved. 2.1 Introduction The C language facilitates a structured and disciplined approach to computer

More information

Primitive Data Types. Trail: Learning the Java Language Lesson: Language Basics Section: Variables

Primitive Data Types. Trail: Learning the Java Language Lesson: Language Basics Section: Variables 1 of 5 2/18/2013 10:49 AM Trail: Learning the Java Language Lesson: Language Basics Section: Variables Primitive Data Types The Java programming language is statically-typed, which means that all variables

More information

Figure 1.12 Entering, Translating, and Running a High-Level Language Program Pearson Education, Inc. All rights reserved.

Figure 1.12 Entering, Translating, and Running a High-Level Language Program Pearson Education, Inc. All rights reserved. Figure 1.12 Entering, Translating, and Running a High-Level Language Program 1 2007 Pearson Education, Inc. All rights reserved. 2 Figure 2.7 General Form of a C Program 2007 Pearson Education, Inc. All

More information

Lecture 5: Java Fundamentals III

Lecture 5: Java Fundamentals III Lecture 5: Java Fundamentals III School of Science and Technology The University of New England Trimester 2 2015 Lecture 5: Java Fundamentals III - Operators Reading: Finish reading Chapter 2 of the 2nd

More information

Introduction to Java CS 1124, Media Computation November 10, 2008 Steve Harrison

Introduction to Java CS 1124, Media Computation November 10, 2008 Steve Harrison Introduction to Java CS 1124, Media Computation November 10, 2008 Steve Harrison DrJava? DrJava is a free integrated development environment for doing Java programming From Rice University It is written

More information

Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA)

Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) České vysoké učení technické v Praze Fakulta elektrotechnická Návrh Uživatelského Rozhraní X36NUR Editors Comparison (NetBeans IDE, Eclipse, ) May 5, 2008 Goal and purpose of test Purpose of this test

More information

Introduction to C++ Programming

Introduction to C++ Programming Introduction to C++ Programming C++ is one of the most popular programming languages in use in industry today. According to the TIOBE Programming Community Index, which can be accessed at this url: http://www.tiobe.com/index.php/content/paperinfo/tpci/

More information

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC MyOra 3.0 SQL Tool for Oracle User Guide Jayam Systems, LLC Contents Features... 4 Connecting to the Database... 5 Login... 5 Login History... 6 Connection Indicator... 6 Closing the Connection... 7 SQL

More information

1. Oral Presentations

1. Oral Presentations Learning Development Service Introduction to PowerPoint: 1. Oral Presentations Using Microsoft PowerPoint 2013 Dr Helen Dixon Information Services Teaching and Learning James Diffin Learning Development

More information

Chapter 2. Values, Variables, and Types. 2.1 Java Values in DrJava s Interaction Pane

Chapter 2. Values, Variables, and Types. 2.1 Java Values in DrJava s Interaction Pane 14 Chapter 2 Values, Variables, and Types In this chapter we explore the primitive building blocks that are used to develop Java programs. We experiment with the following concepts within DrJava s interactive

More information

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

CPLEX Tutorial Handout

CPLEX Tutorial Handout CPLEX Tutorial Handout What Is ILOG CPLEX? ILOG CPLEX is a tool for solving linear optimization problems, commonly referred to as Linear Programming (LP) problems, of the form: Maximize (or Minimize) c

More information

Using Orwell Dev-C++ Starting Dev-C++ Double click the DevC++ Icon: After a few moments, the DevC++ IDE screen will appear:

Using Orwell Dev-C++ Starting Dev-C++ Double click the DevC++ Icon: After a few moments, the DevC++ IDE screen will appear: Using Orwell Dev-C++ Starting Dev-C++ Double click the DevC++ Icon: After a few moments, the DevC++ IDE screen will appear: NOTE: If a Tip of the Day window shows up: Just click the Close button. If you

More information

Opening a Command Shell

Opening a Command Shell Opening a Command Shell Win Cmd Line 1 In WinXP, go to the Programs Menu, select Accessories and then Command Prompt. In Win7, go to the All Programs, select Accessories and then Command Prompt. Note you

More information

Advance Bash Shell Scripting

Advance Bash Shell Scripting Advance Bash Shell Scripting 1- Introduction to Shell What is shell Installation of shell Shell features Bash Keywords Built-in Commands Linux Commands Specialized Navigation and History Commands Shell

More information

BORLAND C++BUILDER 5.5 TUTORIAL

BORLAND C++BUILDER 5.5 TUTORIAL BORLAND C++BUILDER 5.5 TUTORIAL INTRODUCTION The Borland C++Builder 5.5 is a Command-line ANSI C++ compiler for Windows. This guide is intended to assist you in installing, configuring, and using the application.

More information

CprE 419 Lab 1: Using the Cluster, and Introduction to HDFS

CprE 419 Lab 1: Using the Cluster, and Introduction to HDFS Purpose CprE 419 Lab 1: Using the Cluster, and Introduction to HDFS Department of Electrical and Computer Engineering Iowa State University Spring 2014 We have setup an environment on the cystorm cluster

More information

Browser. Browser Overview. List Pane CHAPTER

Browser. Browser Overview. List Pane CHAPTER CHAPTER 9 Browsers Browsers are special kinds of windows that let you see a lot of information about files at once. Browsers typically have two panes: one pane lets you select a file, the other displays

More information

Chapter 3 Application Lesson using Visual C Express Edition

Chapter 3 Application Lesson using Visual C Express Edition Chapter 3 Application Lesson using Visual C++ 2008 Express Edition To start Visual C++ 1. Click the Start button on the Windows taskbar to open the Start menu. 2. Point to All Programs, point to Microsoft

More information

Move between open workbooks. Display the print menu. Select whole spreadsheet. Microsoft Excel Keyboard Keys. General

Move between open workbooks. Display the print menu. Select whole spreadsheet. Microsoft Excel Keyboard Keys. General Microsoft Excel Keyboard Keys Source: http://allhotkeys.com/microsoft_excel_hotkeys.html General New file Ctrl + N Open file Ctrl + O Save file Ctrl + S Move between open workbooks Ctrl + F6 Close file

More information

Introduction to Eclipse

Introduction to Eclipse Introduction to Eclipse Overview Eclipse Background Obtaining and Installing Eclipse Creating a Workspaces / Projects Creating Classes Compiling and Running Code Debugging Code Sampling of Features Summary

More information

Basic C Syntax. Comp-206 : Introduction to Software Systems Lecture 10. Alexandre Denault Computer Science McGill University Fall 2006

Basic C Syntax. Comp-206 : Introduction to Software Systems Lecture 10. Alexandre Denault Computer Science McGill University Fall 2006 Basic C Syntax Comp-206 : Introduction to Software Systems Lecture 10 Alexandre Denault Computer Science McGill University Fall 2006 Next Week I'm away for the week. I'll still check my mails though. No

More information

Pseudo code Tutorial and Exercises Teacher s Version

Pseudo code Tutorial and Exercises Teacher s Version Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy

More information

Appendix K Introduction to Microsoft Visual C++ 6.0

Appendix K Introduction to Microsoft Visual C++ 6.0 Appendix K Introduction to Microsoft Visual C++ 6.0 This appendix serves as a quick reference for performing the following operations using the Microsoft Visual C++ integrated development environment (IDE):

More information

Lesson 1C Using the printf and String.format commands. By John B. Owen All rights reserved 2011, revised 2015

Lesson 1C Using the printf and String.format commands. By John B. Owen All rights reserved 2011, revised 2015 Lesson 1C Using the printf and String.format commands By John B. Owen All rights reserved 2011, revised 2015 Table of Contents Objectives printf command printf examples ABCs of printf The rest of the story

More information

MyOra 3.5. User Guide. SQL Tool for Oracle. Kris Murthy

MyOra 3.5. User Guide. SQL Tool for Oracle. Kris Murthy MyOra 3.5 SQL Tool for Oracle User Guide Kris Murthy Contents Features... 4 Connecting to the Database... 5 Login... 5 Login History... 6 Connection Indicator... 6 Closing the Connection... 7 SQL Editor...

More information

File class in Java. Scanner reminder. Files 10/19/2012. File Input and Output (Savitch, Chapter 10)

File class in Java. Scanner reminder. Files 10/19/2012. File Input and Output (Savitch, Chapter 10) File class in Java File Input and Output (Savitch, Chapter 10) TOPICS File Input Exception Handling File Output Programmers refer to input/output as "I/O". The File class represents files as objects. The

More information

Java Crash Course Part I

Java Crash Course Part I Java Crash Course Part I School of Business and Economics Institute of Information Systems HU-Berlin WS 2005 Sebastian Kolbe skolbe@wiwi.hu-berlin.de Overview (Short) introduction to the environment Linux

More information

java.util.scanner Here are some of the many features of Scanner objects. Some Features of java.util.scanner

java.util.scanner Here are some of the many features of Scanner objects. Some Features of java.util.scanner java.util.scanner java.util.scanner is a class in the Java API used to create a Scanner object, an extremely versatile object that you can use to input alphanumeric characters from several input sources

More information

C++ INTERVIEW QUESTIONS

C++ INTERVIEW QUESTIONS C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get

More information

Objects and Classes. Chap ter. 1.1 Objects and classes. Main concepts discussed in this chapter: Concept

Objects and Classes. Chap ter. 1.1 Objects and classes. Main concepts discussed in this chapter: Concept Chap ter 1 Objects and Classes Main concepts discussed in this chapter: objects methods classes parameters It s time to jump in and get started with our discussion of object-oriented programming. Learning

More information

Lecture 9. Semantic Analysis Scoping and Symbol Table

Lecture 9. Semantic Analysis Scoping and Symbol Table Lecture 9. Semantic Analysis Scoping and Symbol Table Wei Le 2015.10 Outline Semantic analysis Scoping The Role of Symbol Table Implementing a Symbol Table Semantic Analysis Parser builds abstract syntax

More information

Popular Keyboard Shortcuts for Excel

Popular Keyboard Shortcuts for Excel Basic File Operations Ctrl + N Ctrl + O Ctrl + W Ctrl + S F12 Alt + F4 F1 Ctrl + Z Ctrl + Y F4 Ctrl + C Ctrl + X Ctrl + V Delete Ctrl + - (minus) Ctrl + + (plus) Ctrl + ' (apostrophe) Ctrl + R Shift +

More information

Creating External References in Microsoft Excel 2010

Creating External References in Microsoft Excel 2010 Creating External References in Microsoft Excel 2010 Table of Contents LINKING TO CELL REFERENCES... 2 CREATE A CELL REFERENCE ON THE SAME WORKSHEET... 2 CREATE A CELL REFERENCE TO ANOTHER WORKSHEET...

More information

6.096 Lab 1. Due: 7 January 12:30:00. September 20, 2011

6.096 Lab 1. Due: 7 January 12:30:00. September 20, 2011 6.096 Lab 1 Due: 7 January 1:30:00 September 0, 011 1 Additional Material 1.1 Constants A constant is an expressions with a fixed value. Kinds of constants: Literals: used to express particular values

More information

Java Libraries and Methods

Java Libraries and Methods COMP-202 Java Libraries and Methods COMP-202 - Java Library and Methods, 2013 Jörg Kienzle and others Chapter Outline Using Library Methods Java.Math example Writing your own Methods Void Methods Methods

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

Punctuation in C. Identifiers and Expressions. Identifiers. Variables. Keywords. Identifier Examples

Punctuation in C. Identifiers and Expressions. Identifiers. Variables. Keywords. Identifier Examples Identifiers and Expressions CSE 130: Introduction to C Programming Spring 2005 Punctuation in C Statements are terminated with a ; Groups of statements are enclosed by curly braces: { and } Commas separate

More information

Chulalongkorn University International School of Engineering Department of Computer Engineering 2140105 Computer Programming Lab.

Chulalongkorn University International School of Engineering Department of Computer Engineering 2140105 Computer Programming Lab. Chulalongkorn University Name International School of Engineering Student ID Department of Computer Engineering Station No. 2140105 Computer Programming Lab. Date Lab 2 Using Java API documents, command

More information

Huazhong University of Science and Technology JAVA Programming Language Lecture 2:Variables and Data Types

Huazhong University of Science and Technology JAVA Programming Language Lecture 2:Variables and Data Types JAVA Programming Language Lecture 2:Variables and Data Types Chengwei Zhang ( 张成伟 ) School of Electronic Information and Communications Huazhong University of Science and Technology Mar. 2015 Outline Quick

More information

Volume Formulas: Cones, Cylinders, and Spheres

Volume Formulas: Cones, Cylinders, and Spheres Volume Formulas: Cones, Cylinders, and Spheres Purpose: This tutorial will aid students in the memorization of the formulas for the volume of cones, cylinders, and spheres. Included Alice topics: Adding

More information

Setting Up Visual Studio

Setting Up Visual Studio Setting Up Visual Studio Jacob Kneibel Executive Summary In this document, a tutorial is given for setting up Visual Studio, a windows programming environment provided by Microsoft. The tutorial will guide

More information

Appendix A Using the Java Compiler

Appendix A Using the Java Compiler Appendix A Using the Java Compiler 1. Download the Java Development Kit from Sun: a. Go to http://java.sun.com/j2se/1.4.2/download.html b. Download J2SE v1.4.2 (click the SDK column) 2. Install Java. Simply

More information

Programming Fundamental. Instructor Name: Lecture-2

Programming Fundamental. Instructor Name: Lecture-2 Programming Fundamental Instructor Name: Lecture-2 Today s Lecture What is Programming? First C++ Program Programming Errors Variables in C++ Primitive Data Types in C++ Operators in C++ Operators Precedence

More information

int w = (x + x)*y - y; System.out.println("The value of w is " + w); z = w + 3; System.out.println("The value of z is now " + z);

int w = (x + x)*y - y; System.out.println(The value of w is  + w); z = w + 3; System.out.println(The value of z is now  + z); MIT AITI Mobile Application Development in Java Lab 02: Java Basics Instructions on how to submit Lab 2 will be presented on the screen. Please follow instructions and if they are unclear, please feel

More information

How to Install Java onto your system

How to Install Java onto your system How to Install Java onto your system 1. In your browser enter the URL: Java SE 2. Choose: Java SE Downloads Java Platform (JDK) 7 jdk-7- windows-i586.exe. 3. Accept the License Agreement and choose the

More information

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules IBM Operational Decision Manager Version 8 Release 5 Getting Started with Business Rules Note Before using this information and the product it supports, read the information in Notices on page 43. This

More information

Manual Eclipse CDT Mac OS Mountain Lion

Manual Eclipse CDT Mac OS Mountain Lion UNVIERSITY OF VICTORIA Manual Eclipse CDT Mac OS Mountain Lion Installation & Demonstration Guide Przemek Lach 9/3/2013 This guide shows how to use install Eclipse and C- Compiler and how to test the setup

More information

Excel Reports and Macros

Excel Reports and Macros Excel Reports and Macros Within Microsoft Excel it is possible to create a macro. This is a set of commands that Excel follows to automatically make certain changes to data in a spreadsheet. By adding

More information

Chapter 2. println Versus print. Formatting Output withprintf. System.out.println for console output. console output. Console Input and Output

Chapter 2. println Versus print. Formatting Output withprintf. System.out.println for console output. console output. Console Input and Output Chapter 2 Console Input and Output System.out.println for console output System.out is an object that is part of the Java language println is a method invoked dby the System.out object that can be used

More information

Overview of a C Program

Overview of a C Program Overview of a C Program Programming with C CSCI 112, Spring 2015 Patrick Donnelly Montana State University Programming with C (CSCI 112) Spring 2015 2 / 42 C Language Components Preprocessor Directives

More information

CS-201 Introduction to Programming with Java

CS-201 Introduction to Programming with Java CS-201 Introduction to Programming with Java California State University, Los Angeles Computer Science Department Lecture I: Introduction to Computers, Programs, and Java Basic Computer Architecture: Binary

More information

Excel 2007. Getting Started The Excel Window u v w. Microsoft QUICK Source

Excel 2007. Getting Started The Excel Window u v w. Microsoft QUICK Source Microsoft QUICK Source Excel 2007 Getting Started The Excel Window u v w x y z { u Quick Access Toolbar contains shortcuts for the most commonly used tools. v Microsoft Office Button contains common file

More information

Creating a Standard C++ Program in Visual Studio C January 2013

Creating a Standard C++ Program in Visual Studio C January 2013 Creating a Standard C++ Program in Visual Studio C++ 10.0 January 2013 ref: http://msdn.microsoft.com/en-us/library/ms235629(v=vs.100).aspx To create a project and add a source file 1 1. On the File menu,

More information

Taskbar and Start Menu Options

Taskbar and Start Menu Options Taskbar and Start Menu Options This area is used to make changes as to how items appear on the Taskbar or the Start Menu. Click the Start Button. Click Control Panel. The Control Panel window will display

More information

User Manual. pdoc Forms Designer. Copyright Topaz Systems Inc. All rights reserved.

User Manual. pdoc Forms Designer. Copyright Topaz Systems Inc. All rights reserved. User Manual pdoc Forms Designer Copyright Topaz Systems Inc. All rights reserved. For Topaz Systems, Inc. trademarks and patents, visit www.topazsystems.com/legal. Table of Contents 1.0 Introduction...

More information

Importing Contacts to Outlook

Importing Contacts to Outlook Importing Contacts to Outlook 1. The first step is to create a file of your contacts from the National Chapter Database. 2. You create this file under Reporting, Multiple. You will follow steps 1 and 2

More information

Sample- for evaluation purposes only. Advanced Crystal Reports. TeachUcomp, Inc.

Sample- for evaluation purposes only. Advanced Crystal Reports. TeachUcomp, Inc. A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc. 2011 Advanced Crystal Reports TeachUcomp, Inc. it s all about you Copyright: Copyright 2011 by TeachUcomp, Inc. All rights reserved.

More information

Hypercosm. Studio. www.hypercosm.com

Hypercosm. Studio. www.hypercosm.com Hypercosm Studio www.hypercosm.com Hypercosm Studio Guide 3 Revision: November 2005 Copyright 2005 Hypercosm LLC All rights reserved. Hypercosm, OMAR, Hypercosm 3D Player, and Hypercosm Studio are trademarks

More information

3 IDE (Integrated Development Environment)

3 IDE (Integrated Development Environment) Visual C++ 6.0 Guide Part I 1 Introduction Microsoft Visual C++ is a software application used to write other applications in C++/C. It is a member of the Microsoft Visual Studio development tools suite,

More information

Microsoft Word 2003. The Word Window has changed in Office 2003!

Microsoft Word 2003. The Word Window has changed in Office 2003! Microsoft Word 2003 Millsaps College Information Technology Services 2006-2007 Millsaps College Computer Services The Word Window has changed in Office 2003! Menu Bar Formatting Toolbar [modified for 2003]

More information

Basic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C

Basic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C Basic Java Constructs and Data Types Nuts and Bolts Looking into Specific Differences and Enhancements in Java compared to C 1 Contents Hello World Program Statements Explained Java Program Structure in

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

CIS 190: C/C++ Programming. Lecture 1 Introduction and Getting Started

CIS 190: C/C++ Programming. Lecture 1 Introduction and Getting Started CIS 190: C/C++ Programming Lecture 1 Introduction and Getting Started This course will teach you the basics of C and C++ give you more programming experience be appropriate for majors and non-majors not

More information

Your first C program. Which one is best?

Your first C program. Which one is best? Your first C program #include void main(void) { printf( Hello, world!\n ); } #include void main(void) { printf( Hello, ); printf( world! ); printf( \n ); } Which one is best? #include

More information

TIBCO Hawk SNMP Adapter Installation

TIBCO Hawk SNMP Adapter Installation TIBCO Hawk SNMP Adapter Installation Software Release 4.9.0 November 2012 Two-Second Advantage Important Information SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR

More information

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide Open Crystal Reports From the Windows Start menu choose Programs and then Crystal Reports. Creating a Blank Report Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick

More information

Athena Knowledge Base

Athena Knowledge Base Athena Knowledge Base The Athena Visual Studio Knowledge Base contains a number of tips, suggestions and how to s that have been recommended by the users of the software. We will continue to enhance this

More information

An Overview of Java. overview-1

An Overview of Java. overview-1 An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2

More information

Getting Started...7 Open PointOS... 7 Use the Main Menu... 7 Enter Your Access Code... 8 Close PointOS... 8

Getting Started...7 Open PointOS... 7 Use the Main Menu... 7 Enter Your Access Code... 8 Close PointOS... 8 User Manual Table of Contents Getting Started...7 Open PointOS... 7 Use the Main Menu... 7 Enter Your Access Code... 8 Close PointOS... 8 Using the Time Clock...9 Using the System Prompt for Clocking In

More information

Fortis. The ultimate decision making tool INTEGRATING WITH FORTIS. Revised June 2003

Fortis. The ultimate decision making tool INTEGRATING WITH FORTIS. Revised June 2003 Fortis The ultimate decision making tool INTEGRATING WITH FORTIS Revised June 2003 Copyrights, Legal Notices, Trademarks and Servicemarks Copyright 2003 Westbrook Technologies Incorporated. All rights

More information

1 Installation. 2 Setup. 3 Example 0. Jumpstart Flex and Bison Bo Waggoner Updated:

1 Installation. 2 Setup. 3 Example 0. Jumpstart Flex and Bison Bo Waggoner Updated: Jumpstart Flex and Bison Bo Waggoner Updated: 2014-10-18 Abstract Flex and Bison are tools for writing a compiler (they are free/replacement versions of the famous Lex and Yacc). We try to get some minimal

More information

Getting Started in Microsoft Word Click on the Start menu > All Programs > Microsoft Office and select Microsoft Office Word 2007 from the list.

Getting Started in Microsoft Word Click on the Start menu > All Programs > Microsoft Office and select Microsoft Office Word 2007 from the list. Microsoft Word Part 1 Office 2007 Getting Started in Microsoft Word 2007 Opening Word Double click the Word icon on the desktop. OR If there is no shortcut icon on the desktop: Click on the Start menu

More information

Murach s Java SE 6. How to use NetBeans with MIKE MURACH & ASSOCIATES, INC.

Murach s Java SE 6. How to use NetBeans with MIKE MURACH & ASSOCIATES, INC. How to use NetBeans with Murach s Java SE 6 1 How to use NetBeans with Murach s Java SE 6 NetBeans is a software framework for developing Integrated Development Environments (IDEs). In particular, it is

More information

Producing Standards Based Content with ToolBook

Producing Standards Based Content with ToolBook Producing Standards Based Content with ToolBook Contents Using ToolBook to Create Standards Based Content... 3 Installing ToolBook... 3 Creating a New ToolBook Book... 3 Modifying an Existing Question...

More information

Microsoft Excel 2007. Introduction to Microsoft Excel 2007

Microsoft Excel 2007. Introduction to Microsoft Excel 2007 Microsoft Excel 2007 Introduction to Microsoft Excel 2007 Excel is an electronic spreadsheet to organize your data into rows and columns. One can use it to perform basic to advanced level mathematical

More information