Professional Documents
Culture Documents
Lec01 - Intro and HelloWorld Program
Lec01 - Intro and HelloWorld Program
Lec01 - Intro and HelloWorld Program
Programming
Asif Shahzad
Assistant Professor
COMSATS University, Lahore Campus
Before You Start OOP
• You must know how and when to use below
concepts:
• Constants
• Variables
• Expressions
• Conditions
• Loops
Why Object Oriented Programming
• Near to real life objects
• Modularity
• Reusability, inherit from what you have already done
• Code maintenance
• Security
• Flexibility
• Productivity
• Almost all types of apps are developed using OOP
paradigm
Introduction to Java
• Portability: Write Once, Run Anywhere
• Memory management is done by language runtime
• Robust, Secure and Reliable – No pointer arithmetic,
compile time error checking, bytecode verification, etc.
• Strong libraries of components available
• Supports distributed applications, multithreading
• Open Standard – Specs and implementations are
developed separately
Brief History
• Microprocessor are key component in consumer-electronics
• 1991 - Sun Microsystems funded an internal project led by James
Gosling, to write a language that shall execute on all microprocessor
for consumer-electronics.
• 1993, the web wide adaptation given rise to Java because Sun
Micrsosystems launched features to create web applications
• Java become popular because of web, not for its initial goal.
• In 2009, Oracle acquired Sun Microsystems
Life Cycle of Java Program
Life Cycle of Java Program
Make HelloWorldApp program
• Make and run first java program
• Learn basic DOS commands
• cd
• dir
• change drive
• mkdir
• Open a path directly in DOS
Language Basics - Primitive Types
• Variables – Name, Type, Size and Value
• Primitive Types are basic data types provided by Java.
• Names, Category, Memory Size, Literals