Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.

Slides:



Advertisements
Similar presentations
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
Advertisements

In Review JAVA C++ GUIs - Windows Webopedia.com.
Portability and Safety Mahdi Milani Fard Dec, 2006 Java.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
MC697 Object-Oriented Programming Using Java. In this class, we will cover: How the class will be structured Difference between object-oriented programming.
Lab#1 (14/3/1431h) Introduction To java programming cs425
Introduction to Java The objectives of this chapter are: To describe the key aspects of Java To describe the Java software development kit (SDK) To explain.
Object Orientated Programming
got ? Research Project – April 1998 Hang Xia, Mark Wang, Richard S. Chang Updated: R Norman, August 1999.
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
CS884 (Prasad)Java Goals1 “Perfect Quote” You know you've achieved perfection in design, Not when you have nothing more to add, But when you have nothing.
Introduction to Java.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
Java Security Updated May Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security.
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Java and C++, The Difference An introduction Unit - 00.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
CSCE 2013L: Lab 1 Overview  Java Basics The JVM Anatomy of a Java Program  Object-Oriented Programming Overview  Example: Payroll.java JDK Tools and.
Object Oriented Programming Examples: C++, Java Advantages: 1. reusibility of code 2. ability to adapt (extend) previously written code.
POS 406 Java Technology And Beginning Java Code
Java Programming Presented by Daniel Rosenthal Friday, November 30 th, 2007.
JAVA BASICS Prepared by The Smartpath Information Systems
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
CT1513 Introduction To java © A.AlOsaimi.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
1 The JAVA Language Object Oriented Technology Mithani Binjan M.
Today… “Hello World” ritual. Brief History of Java & How Java Works. Introduction to Java class structure. But first, next slide shows Java is No. 1 programming.
Duke CPS From C++ to Java l Java history: Oak, toaster-ovens, internet language, panacea l What it is ä O-O language, not a hybrid (cf. C++)
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
1 Introduction Read D&D Sec 1.8; Sec 1.13 THE Java tutorial -
Java Computer Industry Lab. 1 Programming Java Java Basics Incheon Paik.
Introduction to Programming 1 1 2Introduction to Java.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
RealTimeSystems Lab Jong-Koo, Lim
JAVA TRAINING IN NOIDA. JAVA Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented and specifically.
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.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Applications Active Web Documents Active Web Documents.
Object Oriented Programming in
1. Introduction To JAVA.
JAVA MULTIPLE CHOICE QUESTION.
Before You Begin Nahla Abuel-ola /WIT.
Chapter No. : 1 Introduction to Java.
Topic: Difference b/w JDK, JRE, JIT, JVM
Internet and Java Foundations, Programming and Practice
Java programming lecture one
Introduction Enosis Learning.
Introduction Enosis Learning.
From C++ to Java Java history: Oak, toaster-ovens, internet language, panacea What it is O-O language, not a hybrid (cf. C++) compiled to byte-code, executed.
(Computer fundamental Lab)
Introducing Java.
Chap 1. Getting Started Objectives
Computer Programming-1 CSC 111
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi

Office# 78-A Office hours : S.M.W S…W 12:

Java - General Java is: ▫High level language similar to C++ in syntax ▫Platform independent programming language 3

Compile-time Environment Java Bytecodes move locally or through network Java Source (.java) Java Compiler Java Bytecode (.class ) Java Interpreter Just in Time Compiler Runtime System Class Loader Bytecode Verifier Java Class Libraries Operating System Hardware Java Virtual machine How it works…! 4

Java is independent only for one reason: ▫Only depends on the Java Virtual Machine (JVM). ▫The Java compiler produces a special format called byte code, which is interpreted by the resident JVM (regardless of computer architecture), ▫JIT (just in time) compilers attempt to increase speed. Write Once, Run everywhere 5

Java Features Portable - Write Once, Run Anywhere Automatic memory management Designed for network programming Multi-threaded (multiple simultaneous tasks) Dynamic & extensible (loads of libraries) ▫Classes stored in separate files ▫Loaded only when needed Security has been well thought through 6

Java lets you write special programs called applets that can be downloaded from the Internet and played safely within a web browser. Java restricts what an applet can do. ▫A Java applet cannot write to your hard disk without your permission. ▫It cannot write to arbitrary addresses in memory and thereby introduce a virus into your computer. ▫It should not crash your system. 7

Software required: Java Development Kit (JDK) version 5 ▫ Download: JCreator LE version ▫ 8

Java Development Kit (JDK) (JDK) is a Sun Microsystems product aimed at Java developers. Some of JDK contents: ▫java – The loader for Java applications. This tool is an interpreter. ▫javac – The compiler, which converts source code into Java bytecode. ▫jar – The archiver, which packages related class libraries into a single JAR file. ▫jdb – The debugger ▫appletviewer – This tool can be used to run and debug Java applets without a web browser. 9

Some Object-Oriented Terminology A Class : A class defines the abstract characteristics of a thing and its behavior. An Object : An exemplar of a class. it consists of state and related behavior. An object stores its state in fields and exposes its behavior through methods. Inheritance: programming allows classes to inherit commonly used state and behavior from other classes. use the extends keyword, followed by the name of the class to inherit from: class subClass extends superClass 10

Interface: just like classes except that they use the word interface instead of class and is restricted to containing method declarations without bodies. Interface interface_name { } And to use the interface in the class definition: Public class class_name implements interface_name { } A package: is a namespace that organizes a set of related classes and interfaces. The Java platform provides an enormous class library (a set of packages). This library is known as the "Application Programming Interface", or "API“. 11 Some Object-Oriented Terminology

Language Basics Variables ▫Instance Variables (Non-Static Fields) ▫Class Variables (Static Fields) ▫Local Variables (method’s variables) ▫Parameters Primitive Data Types: byte, short, int, long, float, double, boolean, char. Arrays 12

Reading from a file For writing a java program to read file line by line: ▫Use import java.io.*; ▫Define FileInputStream object to obtain input bytes from a file in a file system (to open the file). ▫Define DataInputStream object to let an application read primitive Java data types from an underlying input stream in a machine-independent way. ▫Define InputStreamReader object which is used as a bridge from byte streams to character streams. 13

Reading from a file Cont. 14 ▫Define BufferedReader object to Read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines. ▫Read File Line By Line using readLine() method of BufferedReader object. ▫Close the input stream.

Good References ndex.htmlhttp://java.sun.com/docs/books/tutorial/java/i ndex.html GOOD LUCK 15

Need to do… 16 Practice to write to a file… You will need that later in your HWs. For writing to a file, you will need to use FileOutputStream object.