Computational Applications in Nuclear Astrophysics using Java Java course Lecture 1

Similar documents
Lecture 1 - Introduction (Class Notes)

Getting Started with Java. Atul Prakash

Lecture 4: Introduction to Java and your Development Environment

Introduction to Java Programming

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Certified Core Java Developer VS-1036

1. Introduction. Java. Fall 2009 Instructor: Dr. Masoud Yaghini

Java language. Part 1. Java fundamentals. Yevhen Berkunskyi, NUoS

Kickstart Intro to Java Part I

Chapter 1 Introduction to Computers, Programs, and Java

The Computer System. Hardware = Physical Computer. Software = Computer Programs. People = End Users & Programmers. people

Java Puzzle Ball Nick Ristuccia

C02: Overview of Software Development and Java

Lecture 1: Introduction to Java

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

CHAPTER 1. Introduction to JAVA Programming

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History

Computational Applications in Nuclear Astrophysics using Java Java course Lecture 2

Computational Applications in Nuclear Astrophysics using Java Java course Lecture 4

1B1a Programming I Getting Started

Index. Course Outline. Grading Policy. Lab Time Distribution. Important Instructions

Setup and Getting Startedt Customized Java EE Training:

For live Java EE training, please see training courses at

Class 1: Homework. Intro to Computer Science CSCI-UA.0101 New York University Courant Institute of Mathematical Sciences Fall 2017

Chapter 1: Introduction to Computers and Java

COMP1007 Principles of Programming

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

Computational Applications in Nuclear Astrophysics using Java Java course Lecture 3

MEAP Edition Manning Early Access Program Get Programming with Java Version 1

CSE 421 Course Overview and Introduction to Java

What is Java Platform?

Manual Eclipse CDT Mac OS Snow Leopard

Notes of the course - Advanced Programming. Barbara Russo

II. Compiling and launching from Command-Line, IDE A simple JAVA program

Summer Assignment for AP Computer Science. Room 302

CS 11 java track: lecture 1

Object-Oriented Programming in Java

3 CREATING YOUR FIRST JAVA APPLICATION (USING WINDOWS)

CHAPTER 1 Introduction to Computers and Java

Introduction to Java

CompSci 125 Lecture 02

Chapter 1 Introduction to Computers, Programs, and Java

Introduction. Introduction to OOP with Java. Lecture 01: Introduction to OOP with Java - AKF Sep AbuKhleiF -

Lecture 1: Overview of Java

AP Computer Science Unit 1. Writing Programs Using BlueJ

CSC116: Introduction to Computing - Java

Introduction to OOP with Java. Instructor: AbuKhleif, Mohammad Noor Sep 2017

Eclipse CDT Tutorial. Eclipse CDT Homepage: Tutorial written by: James D Aniello

COMP 215: INTRO TO PROGRAM DESIGN. Prof. Chris Jermaine Chris Prof. Chris Dr. Chris

Lecture 1: Introduction to Java

Module 3: Working with C/C++

Lesson 04: Our First Java Program (W01D4

CSC116: Introduction to Computing - Java

How to Install (then Test) the NetBeans Bundle

The NetBeans IDE is a big file --- a minimum of around 30 MB. After you have downloaded the file, simply execute the file to install the software.

This lecture will take you through simple and practical approach while learning Java Programming language.

CS260 Intro to Java & Android 04.Android Intro

Java with Eclipse: Setup & Getting Started

02/03/15. Compile, execute, debugging THE ECLIPSE PLATFORM. Blanks'distribu.on' Ques+ons'with'no'answer' 10" 9" 8" No."of"students"vs."no.

NetBeans IDE Java Quick Start Tutorial

Lecture 2, September 4

The Java programming environment. The Java programming environment. Java: A tiny intro. Java features

Introduction to Java Unit 1. Using BlueJ to Write Programs

CS 220: Introduction to Parallel Computing. Beginning C. Lecture 2

CSC116: Introduction to Computing - Java

Advanced Object-Oriented Programming Introduction to OOP and Java

Tutorial 1 CSC 201. Java Programming Concepts عؾادئماظربجمةمبادؿكدامماجلاصا

CS 177 Recitation. Week 1 Intro to Java

Installing and getting started with Xcode for Mac OS.

Using Eclipse for C Programming

AP Computer Science Unit 1. Writing Programs Using BlueJ

Programming with Java

G52PGP. Lecture oo3 Java (A real object oriented language)

Introduction to Computation and Problem Solving

Getting Started with Eclipse/Java

Lecture 02, Fall 2018 Friday September 7

Introduction to Programming (Java) 2/12

Java is a high-level programming language originally developed by Sun Microsystems and released in Java runs on a variety of

Eng. Mohammed S. Abdualal

St. Edmund Preparatory High School Brooklyn, NY

Using Eclipse Che IDE to develop your codebase. Red Hat Developers Documentation Team :15:48 UTC

COMP-202: Foundations of Programming. Lecture 2: Java basics and our first Java program! Jackie Cheung, Winter 2016

Learning objectives. The Java Environment. Java timeline (cont d) Java timeline. Understand the basic features of Java

History of Java. Java was originally developed by Sun Microsystems star:ng in This language was ini:ally called Oak Renamed Java in 1995

Introduction to OOP Using Java Pearson Education, Inc. All rights reserved.

JVM interprets the Java bytecode, controls how it interacts with the operating system and manages memory.

Android Sdk Setup For Windows 7 32 Bit Full Version

WA1827 Cloud Programming Workshop. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

NetBeans Tutorial. For Introduction to Java Programming By Y. Daniel Liang. This tutorial applies to NetBeans 6, 7, or a higher version.

Ahead of Time (AOT) Compilation

You will need to download the Java software development kit from

Outline. Overview. Control statements. Classes and methods. history and advantage how to: program, compile and execute 8 data types 3 types of errors

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

Before you start working with Java, you need to set up a Java development

Java Language. Programs. Computer programs, known as software, are instructions to the computer. You tell a computer what to do through programs.

INF160 IS Development Environments

5/3/2006. Today! HelloWorld in BlueJ. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont.

Imperative and Object Oriented Programming. Tutorial 1. Charlie Abela Department of Artificial Intelligence

Outline. Parts 1 to 3 introduce and sketch out the ideas of OOP. Part 5 deals with these ideas in closer detail.

Clear Cache Guide Click here for Windows guide Click here for Mac OS guide

Transcription:

Computational Applications in Nuclear Astrophysics using Java Java course Lecture 1 Prepared for course 160410/411 Michael C. Kunkel m.kunkel@fz-juelich.de Materials taken from; docs.oracle.com Teach Yourself Java ISBN 9780078825705

Course Outline Introduction to Java Including Installation Installing a Java IDE (Eclipse) Introduction to Github Introduction to Maven Using Java, Maven, and Github for this courses applications Java for the coding Maven for code deployment Github for code bookkeeping

Brief Intro What is Language? language is the use of words/gestures, their pronunciation, and the methods of combining them used and understood by a community Foreign language is a language that gives people a chance to communicate with foreign people Language *Foreign Language*

Brief Intro What is Programming language? Programming language a type of language, like foreign language, that gives opportunities to communicate to computers Programming Language

Brief Intro Programming language acts as a translator between humans and computers ACode.java Java Code Complier 100010010100 100011111010 101011111010 Machine Language Programming language Human readable/writeable Compiles code from programming language to machine language Native language for machines. Binary and hard to understand

Java Java is Open Source Object Oriented Platform Independent (Write once, Run anywhere) Large Scale High level (Closer to human language) Programming language Similar to C/C++, but a bit cleaner

Java vs. C ++ Java is a true object oriented language, while C ++ is the C language with an object oriented extension. Here is a list of some major C ++ features that were omitted (intentionally) from Java Java does not support operator overloading have template classes support multiple inheritance of classes support global variables use pointers use header files

Java Machine Code vs. ByteCode Machine Code Lowest level programming language that can be directly understood by a CPU. Usually long binary sequences of 0 and 1 ByteCode Compiled Java code that is created by the compiler (javac) Loaded by Java interpreter (java) in Java Virtual Machine (JVM)

Java What is JVM (Java Virtual Machine)? Java code execution environment software that interprets ByteCode for the computer Java Code Java Runtime Environment (JRE) Java Virtual Machine (JVM) Operating System (Mac OS, Windows, Linux, Solaris.) Hardware

Java Quick recap on how a Java applications work 1. Program codes saved into source code file Example: MyApp.java 2. Source code is compiled by complier 3.Compiler created ByteCode 4.ByteCode interpreted for OS platform by Java interpreter (Java) in Java Virtual Machine (JVM)

Java Quick recap on how a Java applications work Java Code Example MyApp.java Compiler (javac) Class File MyApp.class (ByteCode) Interpreter (java) JVM OS platform

Installing Java Windows 10 Find if you have Java for Windows 1. Click the Start button 2. Scroll through the applications and programs listed until you see the Java folder 3. Click on the Java folder, then About Java to see the Java version Windows 8 1. Right-click on the screen at bottom-left corner and choose the Control Panel from the pop-up menu. 2. When the Control Panel appears, select Programs 3. Click Programs and Features 4. The installed Java version(s) are listed. Windows 7 and Vista 1. Click Start 2. Select Control Panel 3. Select Programs 4. Click Programs and Features 5. The installed Java version(s) are listed. Windows XP 1. Click Start 2. Select Control Panel 3. Click the Add/Remove Programs control panel icon 4. The Add/Remove control panel displays a list of software on your system, including any Java versions that are on your computer.

Installing Java Find if you have Java for Unix (Mac or Linux) Open a terminal Mac (command + space ) to open spotlight type terminal-> open terminal Linux (depends on flavor) Ubuntu: Open Desktop application menu type terminal-> open terminal In terminal type java -version We will be using Java 8 i.e. java version 1.8.X_XX

Installing Java In web browser go to http://www.oracle.com/technetwork/java/ javase/downloads/index.html Or Google Java Download. Make sure you go to official Oracle website

Installing Java Scroll Down until Click Here

Installing Java 1.Read 2.Accept 3.Choose 4.Install per OS methods

IDE A tool to aide in coding, packaging and compiling codes in Java (also other languages) is an IDE (Integrated Development Environment.) An IDE provides features, including but not limited to: Source code editing Syntax Highlighting Debugging Automatic method completion

IDE In this course, its not mandatory to use an IDE. However, most features we will use in this course such as Github, Maven, importing external libraries are integrated into most IDE s Eclipse, Netbeans, IntelliusJ are some examples of IDE s Eclipse is the preferred IDE for this course

Eclipse Download and install Eclipse In a web browser go to http:// www.eclipse.org/ Scroll to the bottom and click Packages Choose Eclipse IDE for Java EE Developers

Eclipse 1. Go here 2. Click here

1. Click here Eclipse

Eclipse 1. Choose

Optimizing Eclipse This will be a hands on Demo and should take approximately 5 minutes Will demonstrate: Formatting source code upon save Content assistance Authoring codes

First Program Lets open Eclipse Lets make a new Java Project File->New->Other->Java Project Name it HelloWorld

Java Package: A group of related files

Java Every Java program must have a public class. A Java program can have only one public class, but can have other classes not declared public. The file name must be the same as the public class name.

Java The entrance and exit of all Java executions is in the main method

Java Public: Method can be accessed by anywhere it is called Static: This is a main method that should be loaded to memory once Void: Method will not return any value after execution main: this is where the execution of java begins String[] args Required for all main method declarations An array of command line parameters in an array of String type. These are specified when program is ran.

Java Click in here and lets play with some Eclipse content assistance Since we configured Eclipse to have content assistance lets type sys (at this point Eclipse should have a scroll down box of suggestions) syserr - Print to standard error - System.err.println() sysout - Print to standard out - System.out.println() systrace -Print current method to standard out - Scroll and tell me what it says.

Homework Lets use sysout - System.out.println() Inside the () place anything inside. It will be a string literal, while any numerical calculation from Classes, methods or input can be placed without Concatenate by using the + operator Using System.out.println() print to the screen Hello World

Homework Hit the Run button to see output Congratulations, that is your first Java Program

Next Class More Java GitHub Maven