SlideShare una empresa de Scribd logo
1 de 23
1
Discussion about???

Why need to navigate to   Java code life cycle
JAVA?                     Data types.
Goals of JAVA.            Wrapper Classes.
Features of JAVA.         Operators.
C++ Vs JAVA.




                                                 2
Why ‘JAVA’ the programming
         language?
The ultimate aim to develop the JAVA programming language
is to implement the words “write once; run anywhere, any time,
forever”.

This is the problem the people meet at that time. The wanted
to have the language that can be run for any platform(Operating
System). This led to the development of JAVA as initial name
Oak. Then JAVA COFFEE, finally renamed as JAVA.


                                                               3
cntd.....




        The application needed to be platform independent in some
        places. Assume the situation the application is going to be run on
        networked systems.

            In network many kind of system specification and OS may be
            there. In this case the application must be a Platform
            independent. Here, JAVA will help us.




                                                                        4
Goal of JAVA
It should use the object-oriented programming methodology.

It should allow the same program to be executed on multiple
operating systems.

It should contain built-in support for using computer networks.

It should be designed to execute code from remote sources
securely.

It should be easy to use by selecting what was considered the
good parts of other object-oriented languages.

                                                                  5
Features of JAVA

Simple              Architecture-neutral

Secure              Interpreted

Portable            High performance

Object-oriented     Automatic Garbage Collection

Robust

Multithreaded



                                               6
Automatic Garbage Collection

The memory management(allocation and de-allocation) of an
allocated object is done automatically.

If the reference for the object is not available in program, then
the JVM automatically de-allocates the memory for that object.

If this is not done automatically, the programmer must do the
code to manage the memory(allocate and de-allocate).

If not de-allocated by the programmer, then the memory
fragmentation is difficult. Memory leak will occur.
                                                                    7
Example code
public static int main(String[] a)
{
  System.out.println(“n”+4+34);
  return 0;
}

Output???

Error: Main method not found in class sample, please define the main method as:
        public static void main(String[] args)




                                                                                  8
eg: cntd

 public static void main(String[] a)
 {
    System.out.println(“n”+4+34);
    System.out.println(34+2+"n");
    return 0;
 }
 Output ??? 434
               36



   public static void main(String[] a)
   {
            System.out.println(4+34);
            return 0;
   }
         Output ???     38

                                         9
C++ Vs
                 C++                                     JAVA

Not a full-fledged object oriented      The pure Object oriented language.
language. Because, we can write the
complete program without using
class.


We can write an error free program,     Here, we can not complete the
with class and without having any       execution without having code within
code within the main(). The program     the main().
can be correctly executed completely.


Multiple inheritance is supported.      Multiple inheritance is removed.

Operator overloading is available.      Not available.

                                                            cntd….             10
Virtual functions is available.           Indirectly method overriding having
                                          the working of virtual function.

Pointers, references available.           References only available.

Platform dependent.                       Platform independent.

Abstract class avail.                     Abstract class may be mapped to Interface.



Automatic garbage collection not avail.   Available.

Not a strongly typed language.            Strongly typed language.

Unicode not supported.                    Unicode support provided.

Destructor available.                     finalize() method available instead
                                          destructor.

const                                     final

                                                                                  11
Function prototype

In C++ the function prototype is ??
     return_type function_name(argument_list)

In java for the function prototype concentration on 4 things.
return_type function_name(argument_list) Exception




                                                                12
Code Life cycle




                  13
Data Types
All the data types available in C++ available in JAVA. But some
more additions upgraded.
The data width of int and char are upgraded as follows.,
The extra data types are also introduced.
              Data type              Size(bits)
    long                     64
    int                      32
    short                    16
    char                     16
                          New
    byte                     8
    boolean                  1
                                                              14
Wrapper Classes
Wrapper classes are special type of classes those bind with the simple
types(Built-in data types).

The Number class is an abstract class that defines a super class that is
implemented by the classes that wrap the numeric types(byte, int,
float, double, long, short).

The class name starts with the uppercase., like Integer, Float.

Each and every wrapper class defines its own methods and constant
data members. The constant data members declared with the names
full of uppercases. eg., Integer.MIN_VALUE.

                                                                       15
for example


public static void main(String[] arg)
{
  Integer g;
  g=45;
  System.out.println("ng : “+g);
}



Output
  45




                                        16
Operators

The operators used in C++ all supported in JAVA too.

The I/O stream operators is not possible in java(<<,>>). But
these operators used as a bitwise operators.

Operator overloading can not be done by the user. But in
JAVA, there are some implemented provisions those using the
pre-defined operators with the class.

The arithmetic, relational operators used with the String class
objects.
                                                                  17
example…..

public static void main(String[] arg)
{
  String fg=“PSG",gh=“Psg";
  if((fg+=gh)==fg)
         System.out.println("same....n");
  else
         System.out.println(“Not same....n");
}

        Output:
                        same....




                                                 18
Example
public static void main(String[] arr)
{
  int i1=45;
  int i2=34;
  System.out.println(“Ans is : “+i1+i2);
}

Output???
          Ans is : 4534




                                           19
General example
public static void main(String[] arg)
{
  DataInputStream inp=new DataInputStream(System.in);
  String mine=inp.readLine();
}

output???
            Error: Un handled Exception IOException




                                                        20
Revised

public static void main(String[] arg) throws IOEception
{
  DataInputStream inp=new DataInputStream(System.in);
  String mine=inp.readLine();
  System.out.println(“nString is : ”+mine);
  float h=Float.parseFloat(inp.readLine());
  System.out.println(“n Float values is : ” +h);
}




                                                          21
22
23

Más contenido relacionado

La actualidad más candente

JNA - Let's C what it's worth
JNA - Let's C what it's worthJNA - Let's C what it's worth
JNA - Let's C what it's worthIdan Sheinberg
 
Programming with Python - Basic
Programming with Python - BasicProgramming with Python - Basic
Programming with Python - BasicMosky Liu
 
Qcon2011 functions rockpresentation_f_sharp
Qcon2011 functions rockpresentation_f_sharpQcon2011 functions rockpresentation_f_sharp
Qcon2011 functions rockpresentation_f_sharpMichael Stal
 
Future Programming Language
Future Programming LanguageFuture Programming Language
Future Programming LanguageYLTO
 
Know yourengines velocity2011
Know yourengines velocity2011Know yourengines velocity2011
Know yourengines velocity2011Demis Bellot
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPTShivam Gupta
 
Learn Python The Hard Way Presentation
Learn Python The Hard Way PresentationLearn Python The Hard Way Presentation
Learn Python The Hard Way PresentationAmira ElSharkawy
 
C# / Java Language Comparison
C# / Java Language ComparisonC# / Java Language Comparison
C# / Java Language ComparisonRobert Bachmann
 
Python Interview Questions And Answers
Python Interview Questions And AnswersPython Interview Questions And Answers
Python Interview Questions And AnswersH2Kinfosys
 
The Benefits of Type Hints
The Benefits of Type HintsThe Benefits of Type Hints
The Benefits of Type Hintsmasahitojp
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)Ishin Vin
 

La actualidad más candente (17)

java vs C#
java vs C#java vs C#
java vs C#
 
JNA - Let's C what it's worth
JNA - Let's C what it's worthJNA - Let's C what it's worth
JNA - Let's C what it's worth
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Programming with Python - Basic
Programming with Python - BasicProgramming with Python - Basic
Programming with Python - Basic
 
Python revision tour i
Python revision tour iPython revision tour i
Python revision tour i
 
Qcon2011 functions rockpresentation_f_sharp
Qcon2011 functions rockpresentation_f_sharpQcon2011 functions rockpresentation_f_sharp
Qcon2011 functions rockpresentation_f_sharp
 
Future Programming Language
Future Programming LanguageFuture Programming Language
Future Programming Language
 
Know yourengines velocity2011
Know yourengines velocity2011Know yourengines velocity2011
Know yourengines velocity2011
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
 
Learn Python The Hard Way Presentation
Learn Python The Hard Way PresentationLearn Python The Hard Way Presentation
Learn Python The Hard Way Presentation
 
C# / Java Language Comparison
C# / Java Language ComparisonC# / Java Language Comparison
C# / Java Language Comparison
 
Python Interview Questions And Answers
Python Interview Questions And AnswersPython Interview Questions And Answers
Python Interview Questions And Answers
 
Os Goodger
Os GoodgerOs Goodger
Os Goodger
 
Actors model in gpars
Actors model in gparsActors model in gpars
Actors model in gpars
 
Oops presentation
Oops presentationOops presentation
Oops presentation
 
The Benefits of Type Hints
The Benefits of Type HintsThe Benefits of Type Hints
The Benefits of Type Hints
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)
 

Destacado

09 binary-trees
09 binary-trees09 binary-trees
09 binary-treesTech_MX
 
Trends and technologies in system softwares
Trends and technologies in system softwaresTrends and technologies in system softwares
Trends and technologies in system softwaresTech_MX
 
Constants
ConstantsConstants
ConstantsTech_MX
 
Mutable and immutable classes
Mutable and  immutable classesMutable and  immutable classes
Mutable and immutable classesTech_MX
 
Graph theory
Graph theoryGraph theory
Graph theoryTech_MX
 
More on Lex
More on LexMore on Lex
More on LexTech_MX
 
What are interpersonal skills
What are interpersonal skillsWhat are interpersonal skills
What are interpersonal skillsTech_MX
 
Linear programming problem
Linear programming problemLinear programming problem
Linear programming problemTech_MX
 
Investment problem
Investment problemInvestment problem
Investment problemTech_MX
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2Tech_MX
 
Buddy system final
Buddy system finalBuddy system final
Buddy system finalTech_MX
 
Set data structure
Set data structure Set data structure
Set data structure Tech_MX
 
Graph data structure
Graph data structureGraph data structure
Graph data structureTech_MX
 
Inline function
Inline functionInline function
Inline functionTech_MX
 
E post office system
E post office systemE post office system
E post office systemTech_MX
 
Combined paging and segmentation
Combined paging and segmentationCombined paging and segmentation
Combined paging and segmentationTech_MX
 

Destacado (19)

09 binary-trees
09 binary-trees09 binary-trees
09 binary-trees
 
Trends and technologies in system softwares
Trends and technologies in system softwaresTrends and technologies in system softwares
Trends and technologies in system softwares
 
Constants
ConstantsConstants
Constants
 
Mutable and immutable classes
Mutable and  immutable classesMutable and  immutable classes
Mutable and immutable classes
 
Graph theory
Graph theoryGraph theory
Graph theory
 
More on Lex
More on LexMore on Lex
More on Lex
 
What are interpersonal skills
What are interpersonal skillsWhat are interpersonal skills
What are interpersonal skills
 
Linear programming problem
Linear programming problemLinear programming problem
Linear programming problem
 
Investment problem
Investment problemInvestment problem
Investment problem
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2
 
Buddy system final
Buddy system finalBuddy system final
Buddy system final
 
Set data structure
Set data structure Set data structure
Set data structure
 
Graph data structure
Graph data structureGraph data structure
Graph data structure
 
Inline function
Inline functionInline function
Inline function
 
E post office system
E post office systemE post office system
E post office system
 
Combined paging and segmentation
Combined paging and segmentationCombined paging and segmentation
Combined paging and segmentation
 
Linkers
LinkersLinkers
Linkers
 
Uid
UidUid
Uid
 
Spss
SpssSpss
Spss
 

Similar a 14.jun.2012

Cross Platform App Development with C++
Cross Platform App Development with C++Cross Platform App Development with C++
Cross Platform App Development with C++Joan Puig Sanz
 
Java Notes by C. Sreedhar, GPREC
Java Notes by C. Sreedhar, GPRECJava Notes by C. Sreedhar, GPREC
Java Notes by C. Sreedhar, GPRECSreedhar Chowdam
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeDmitri Nesteruk
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
 
Introduction to Software Development
Introduction to Software DevelopmentIntroduction to Software Development
Introduction to Software DevelopmentZeeshan MIrza
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1ReKruiTIn.com
 
object oriented programming concept in java.pptx
object oriented programming concept in java.pptxobject oriented programming concept in java.pptx
object oriented programming concept in java.pptxNagasivaparvathi
 
Unit Testing RPG with JUnit
Unit Testing RPG with JUnitUnit Testing RPG with JUnit
Unit Testing RPG with JUnitGreg.Helton
 
NDK Primer (Wearable DevCon 2014)
NDK Primer (Wearable DevCon 2014)NDK Primer (Wearable DevCon 2014)
NDK Primer (Wearable DevCon 2014)Ron Munitz
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...yazad dumasia
 
Computer network in java
Computer network in java Computer network in java
Computer network in java YasirAli74993
 
21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)ssuser7f90ae
 
Java OOP Concepts 1st Slide
Java OOP Concepts 1st SlideJava OOP Concepts 1st Slide
Java OOP Concepts 1st Slidesunny khan
 

Similar a 14.jun.2012 (20)

Cross Platform App Development with C++
Cross Platform App Development with C++Cross Platform App Development with C++
Cross Platform App Development with C++
 
Java Notes
Java Notes Java Notes
Java Notes
 
Java Notes by C. Sreedhar, GPREC
Java Notes by C. Sreedhar, GPRECJava Notes by C. Sreedhar, GPREC
Java Notes by C. Sreedhar, GPREC
 
Java
JavaJava
Java
 
Java basic
Java basicJava basic
Java basic
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)
 
Introduction to Software Development
Introduction to Software DevelopmentIntroduction to Software Development
Introduction to Software Development
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1
 
object oriented programming concept in java.pptx
object oriented programming concept in java.pptxobject oriented programming concept in java.pptx
object oriented programming concept in java.pptx
 
Unit Testing RPG with JUnit
Unit Testing RPG with JUnitUnit Testing RPG with JUnit
Unit Testing RPG with JUnit
 
Cse java
Cse javaCse java
Cse java
 
NDK Primer (Wearable DevCon 2014)
NDK Primer (Wearable DevCon 2014)NDK Primer (Wearable DevCon 2014)
NDK Primer (Wearable DevCon 2014)
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
 
Computer network in java
Computer network in java Computer network in java
Computer network in java
 
21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)21UCAC31 Java Programming.pdf(MTNC)(BCA)
21UCAC31 Java Programming.pdf(MTNC)(BCA)
 
Java OOP Concepts 1st Slide
Java OOP Concepts 1st SlideJava OOP Concepts 1st Slide
Java OOP Concepts 1st Slide
 
OOP-Chap2.docx
OOP-Chap2.docxOOP-Chap2.docx
OOP-Chap2.docx
 
Java lab zero lecture
Java  lab  zero lectureJava  lab  zero lecture
Java lab zero lecture
 
Csharp dot net
Csharp dot netCsharp dot net
Csharp dot net
 

Más de Tech_MX

Virtual base class
Virtual base classVirtual base class
Virtual base classTech_MX
 
Theory of estimation
Theory of estimationTheory of estimation
Theory of estimationTech_MX
 
Templates in C++
Templates in C++Templates in C++
Templates in C++Tech_MX
 
String & its application
String & its applicationString & its application
String & its applicationTech_MX
 
Statistical quality__control_2
Statistical  quality__control_2Statistical  quality__control_2
Statistical quality__control_2Tech_MX
 
Stack data structure
Stack data structureStack data structure
Stack data structureTech_MX
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application Tech_MX
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applicationsTech_MX
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
 
Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Tech_MX
 
Motherboard of a pc
Motherboard of a pcMotherboard of a pc
Motherboard of a pcTech_MX
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbmsTech_MX
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)Tech_MX
 
Memory dbms
Memory dbmsMemory dbms
Memory dbmsTech_MX
 
Linear regression
Linear regressionLinear regression
Linear regressionTech_MX
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interruptTech_MX
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loadersTech_MX
 
Interpersonal communication
Interpersonal communicationInterpersonal communication
Interpersonal communicationTech_MX
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theoryTech_MX
 

Más de Tech_MX (20)

Virtual base class
Virtual base classVirtual base class
Virtual base class
 
Theory of estimation
Theory of estimationTheory of estimation
Theory of estimation
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
 
String & its application
String & its applicationString & its application
String & its application
 
Statistical quality__control_2
Statistical  quality__control_2Statistical  quality__control_2
Statistical quality__control_2
 
Stack data structure
Stack data structureStack data structure
Stack data structure
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applications
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
Parsing
ParsingParsing
Parsing
 
Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)
 
Motherboard of a pc
Motherboard of a pcMotherboard of a pc
Motherboard of a pc
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbms
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)
 
Memory dbms
Memory dbmsMemory dbms
Memory dbms
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interrupt
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loaders
 
Interpersonal communication
Interpersonal communicationInterpersonal communication
Interpersonal communication
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theory
 

Último

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Último (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

14.jun.2012

  • 1. 1
  • 2. Discussion about??? Why need to navigate to Java code life cycle JAVA? Data types. Goals of JAVA. Wrapper Classes. Features of JAVA. Operators. C++ Vs JAVA. 2
  • 3. Why ‘JAVA’ the programming language? The ultimate aim to develop the JAVA programming language is to implement the words “write once; run anywhere, any time, forever”. This is the problem the people meet at that time. The wanted to have the language that can be run for any platform(Operating System). This led to the development of JAVA as initial name Oak. Then JAVA COFFEE, finally renamed as JAVA. 3
  • 4. cntd..... The application needed to be platform independent in some places. Assume the situation the application is going to be run on networked systems. In network many kind of system specification and OS may be there. In this case the application must be a Platform independent. Here, JAVA will help us. 4
  • 5. Goal of JAVA It should use the object-oriented programming methodology. It should allow the same program to be executed on multiple operating systems. It should contain built-in support for using computer networks. It should be designed to execute code from remote sources securely. It should be easy to use by selecting what was considered the good parts of other object-oriented languages. 5
  • 6. Features of JAVA Simple Architecture-neutral Secure Interpreted Portable High performance Object-oriented Automatic Garbage Collection Robust Multithreaded 6
  • 7. Automatic Garbage Collection The memory management(allocation and de-allocation) of an allocated object is done automatically. If the reference for the object is not available in program, then the JVM automatically de-allocates the memory for that object. If this is not done automatically, the programmer must do the code to manage the memory(allocate and de-allocate). If not de-allocated by the programmer, then the memory fragmentation is difficult. Memory leak will occur. 7
  • 8. Example code public static int main(String[] a) { System.out.println(“n”+4+34); return 0; } Output??? Error: Main method not found in class sample, please define the main method as: public static void main(String[] args) 8
  • 9. eg: cntd public static void main(String[] a) { System.out.println(“n”+4+34); System.out.println(34+2+"n"); return 0; } Output ??? 434 36 public static void main(String[] a) { System.out.println(4+34); return 0; } Output ??? 38 9
  • 10. C++ Vs C++ JAVA Not a full-fledged object oriented The pure Object oriented language. language. Because, we can write the complete program without using class. We can write an error free program, Here, we can not complete the with class and without having any execution without having code within code within the main(). The program the main(). can be correctly executed completely. Multiple inheritance is supported. Multiple inheritance is removed. Operator overloading is available. Not available. cntd…. 10
  • 11. Virtual functions is available. Indirectly method overriding having the working of virtual function. Pointers, references available. References only available. Platform dependent. Platform independent. Abstract class avail. Abstract class may be mapped to Interface. Automatic garbage collection not avail. Available. Not a strongly typed language. Strongly typed language. Unicode not supported. Unicode support provided. Destructor available. finalize() method available instead destructor. const final 11
  • 12. Function prototype In C++ the function prototype is ?? return_type function_name(argument_list) In java for the function prototype concentration on 4 things. return_type function_name(argument_list) Exception 12
  • 14. Data Types All the data types available in C++ available in JAVA. But some more additions upgraded. The data width of int and char are upgraded as follows., The extra data types are also introduced. Data type Size(bits) long 64 int 32 short 16 char 16 New byte 8 boolean 1 14
  • 15. Wrapper Classes Wrapper classes are special type of classes those bind with the simple types(Built-in data types). The Number class is an abstract class that defines a super class that is implemented by the classes that wrap the numeric types(byte, int, float, double, long, short). The class name starts with the uppercase., like Integer, Float. Each and every wrapper class defines its own methods and constant data members. The constant data members declared with the names full of uppercases. eg., Integer.MIN_VALUE. 15
  • 16. for example public static void main(String[] arg) { Integer g; g=45; System.out.println("ng : “+g); } Output 45 16
  • 17. Operators The operators used in C++ all supported in JAVA too. The I/O stream operators is not possible in java(<<,>>). But these operators used as a bitwise operators. Operator overloading can not be done by the user. But in JAVA, there are some implemented provisions those using the pre-defined operators with the class. The arithmetic, relational operators used with the String class objects. 17
  • 18. example….. public static void main(String[] arg) { String fg=“PSG",gh=“Psg"; if((fg+=gh)==fg) System.out.println("same....n"); else System.out.println(“Not same....n"); } Output: same.... 18
  • 19. Example public static void main(String[] arr) { int i1=45; int i2=34; System.out.println(“Ans is : “+i1+i2); } Output??? Ans is : 4534 19
  • 20. General example public static void main(String[] arg) { DataInputStream inp=new DataInputStream(System.in); String mine=inp.readLine(); } output??? Error: Un handled Exception IOException 20
  • 21. Revised public static void main(String[] arg) throws IOEception { DataInputStream inp=new DataInputStream(System.in); String mine=inp.readLine(); System.out.println(“nString is : ”+mine); float h=Float.parseFloat(inp.readLine()); System.out.println(“n Float values is : ” +h); } 21
  • 22. 22
  • 23. 23