SlideShare a Scribd company logo
1 of 20
Intro to
Intro to Me
Plan of Attack
 History and Impact of Java
 Characteristics of Java
 Development and Compilation in Java
 Installing IDE
 Similarities with Ruby
 Differences with Ruby
 Objects, Variables, Classes, Constructors, Methods, Exception Handling,
Multiple Inheritance
 Examples
History and Impact of Java
History and Impact of Java
 Created by Sun Microsystems in 1995
 Largely derived and simplified from C++
 “Write once, run anywhere”
 Amazon, Facebook, Google, Square, Twitter
 https://blog.twitter.com/2011/twitter-search-now-3x-faster
Characteristics of Java
 Simple
 Object-oriented
 Interpreted
 Multithreaded
 Dynamic
Reference:
http://docs.oracle.com/javase/tutorial/getStarted/intro/definition.html
 Architecture neutral
 Portable
 High performance
 Robust
 Secure
Development
Java Development Kit
Java Runtime
Environment
Java Virtual Machine
Reference: http://www.javabeat.net/what-is-the-difference-between-
jrejvm-and-jdk/
Compilation
Reference:
http://docs.oracle.com/javase/tutorial/getStarted/intro/definition.html
Installation
 Install Java
 http://support.apple.com/kb/DL1572
 Install JDK
 http://www.oracle.com/technetwork/java/javase/downloa
ds/jdk8-downloads-2133151.html
 Install IntelliJ
 https://www.jetbrains.com/idea/download/
Similarities with Ruby
 Object-oriented
 Provide inheritance
 A class may extend only one other class
 Public, private, protected modifiers
 Automatic garbage collection
Objects
 Ruby
 Everything is an object, including classes and instances of
types
 Java
 Primitive data types – do not extend object class
 int, double, boolean, char, etc.
 Strings have special support from java.lang.String
class
 Immutable
 Technically not a primitive data type
Variables
Ruby
age = 2
age = “two”
Java
int age = 2;
String age = “two”;
Classes
Ruby
class Dog
end
d = Dog.new
Java
public class Dog(){
}
Dog d = new Dog();
Constructors
 Ruby uses the “initialize” keyword for all classes
class Dog
def initialize(breed)
@breed = breed
end
end
 Java requires the public keyword and class name
public class Dog(){
public Dog(String breed){
this.breed = breed;
}
}
Methods
Ruby
def getAge
return 1
end
Java
public int getAge(){
return 1;
}
Naming Conventions
 Packages
 Lowercase i.e. com.mycompany.util.package
 Classes
 CamelCase
 Interfaces
 CamelCase
 Starts with an “I” to denote interface (not required)
 Methods, Variables
 mixedCase
 Constants
 All caps
Quick Example
Exception Handling
Ruby
begin
rescue Exception1
rescue Exception2
ensure
end
Java
try {
}
catch (Exception e) {
}
finally() {
}
Multiple Inheritance
 Ruby uses modules and mixins
 Java uses interfaces that consist of abstract methods
Let’s get to it!

More Related Content

What's hot

Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
jaimefrozr
 

What's hot (20)

Java Programming
Java ProgrammingJava Programming
Java Programming
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core java
 
This keyword in java
This keyword in javaThis keyword in java
This keyword in java
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Threads in JAVA
Threads in JAVAThreads in JAVA
Threads in JAVA
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Fundamentals of JAVA
Fundamentals of JAVAFundamentals of JAVA
Fundamentals of JAVA
 
Introduction of java
Introduction  of javaIntroduction  of java
Introduction of java
 
Java swing
Java swingJava swing
Java swing
 
JVM
JVMJVM
JVM
 
Constructor overloading & method overloading
Constructor overloading & method overloadingConstructor overloading & method overloading
Constructor overloading & method overloading
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 

Similar to Intro to Java

Introduction to Spring sec1.pptx
Introduction to Spring sec1.pptxIntroduction to Spring sec1.pptx
Introduction to Spring sec1.pptx
NourhanTarek23
 
Selenium coursecontent linkedin
Selenium coursecontent   linkedinSelenium coursecontent   linkedin
Selenium coursecontent linkedin
Selenium Training
 
Netbeans
NetbeansNetbeans
Netbeans
acosdt
 
TechSearchWeb.pdf
TechSearchWeb.pdfTechSearchWeb.pdf
TechSearchWeb.pdf
TechSearchWeb
 
Technology Tutorial.pdf
Technology Tutorial.pdfTechnology Tutorial.pdf
Technology Tutorial.pdf
TechSearchWeb
 

Similar to Intro to Java (20)

Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Introduction to Spring sec1.pptx
Introduction to Spring sec1.pptxIntroduction to Spring sec1.pptx
Introduction to Spring sec1.pptx
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App Engine
 
Selenium coursecontent linkedin
Selenium coursecontent   linkedinSelenium coursecontent   linkedin
Selenium coursecontent linkedin
 
best java training center in chennai
best java training center in chennaibest java training center in chennai
best java training center in chennai
 
Java Development Environment
Java Development EnvironmentJava Development Environment
Java Development Environment
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level Overview
 
Java Coaching in Hyderabad introduction
Java Coaching in Hyderabad  introductionJava Coaching in Hyderabad  introduction
Java Coaching in Hyderabad introduction
 
Lecture - 1 introduction to java
Lecture - 1 introduction to javaLecture - 1 introduction to java
Lecture - 1 introduction to java
 
Netbeans
NetbeansNetbeans
Netbeans
 
Spring competitive tests
Spring competitive testsSpring competitive tests
Spring competitive tests
 
TechSearchWeb Tutorials.pdf
TechSearchWeb Tutorials.pdfTechSearchWeb Tutorials.pdf
TechSearchWeb Tutorials.pdf
 
Spring boot competitive tests
Spring boot competitive testsSpring boot competitive tests
Spring boot competitive tests
 
Spring boot competitive tests
Spring boot competitive testsSpring boot competitive tests
Spring boot competitive tests
 
Developing Agile Java Applications using Spring tools
Developing Agile Java Applications using Spring toolsDeveloping Agile Java Applications using Spring tools
Developing Agile Java Applications using Spring tools
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022
 
TechSearchWeb.pdf
TechSearchWeb.pdfTechSearchWeb.pdf
TechSearchWeb.pdf
 
Technology Tutorial.pdf
Technology Tutorial.pdfTechnology Tutorial.pdf
Technology Tutorial.pdf
 
Meteor
MeteorMeteor
Meteor
 
Java
JavaJava
Java
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Intro to Java

Editor's Notes

  1. WORA means that compiled Java code can run on all platforms that support Java without the need for recompilation
  2. Simple - relative to C++ Interpreted -
  3. JDK includes dev tools and the JRE Compiler: javac Java archiver: JAR Dissassembler: javap JRE contains JVM, class libraries no tools like the compiler Java: launches app Javaw: launches w.o console Rt.jar: compiled class files
  4. Ruby is an interpreted scripting language, whereas Java is a compiled programming language Ruby is run directly without first needing to be compiled Why interpreted? Compiled into .class files by the javac compiler The .class file contains bytecodes (rather than architecture-specific machine code) – the language of the JVM The JVM converts the bytecode to machine code based on the operating system - capable of running on Microsoft Windows, the Solaris™ Operating System (Solaris OS), Linux, or Mac OS
  5. Just as Ruby on Rails is the framework for developing MVC apps, Java EE is the Java equivalent
  6. Ruby is dynamically typed so type declarations are not used Java is statically typed so type declarations are required
  7. Class definition Ruby defines blocks using the ‘end’ keyword Java defines blocks using the brackets In ruby, class definitions do not have an access modifier Class instantiation Ruby does not use type declarations b/c it is dynamically typed Java requires type declarations b/c it is statically typed
  8. Ruby methods may return values but the type is not specified in the method definition Ruby methods are public by default
  9. Abstract methods are then implemented by the class that is implementing the interface