Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka

926 views

Published on

This Edureka "What Is Java" tutorial will help you in understanding the various fundamentals of Java in detail with examples. Below are the topics covered in this tutorial:

1) What is Java?
2) Where is Java used?
3) Features of Java
4) Java Environment
5) How does Java work?
6) Data Types in Java
7) Operators in Java
8) Functions in Java
9) Object Oriented Concepts in Java

Published in: Technology
  • Be the first to comment

What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka

  1. 1. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING What is Hadoop?
  2. 2. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Agenda For Today ➢ What is Java? ➢ Where is Java used? ➢ Features of Java ➢ Java Environment ➢ How does Java work? ➢ Data Types in Java ➢ Operators in Java ➢ Functions in Java ➢ Object Oriented Concepts in Java
  3. 3. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING What is Java?
  4. 4. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING What is Java? ➢ Java was created by a team lead by James Gosling in 1995 for Sun Microsystems. ➢ Java is a platform independent programming language that follows the logic of “Write once, Run anywhere”. Programming Language Operations Platform
  5. 5. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING What is Java? January 1996 February 1997 December 1998 May 2000 February 2002 September 2004 December 2006 July 2011 March 2014 Java 1.0 Oak Java 1.1 Java 1.2 Playground Java1.3 Kestrel Java 1.4 Merlin Java 5 Tiger Java 6 Mustang Java 7 Dolphin Java 8
  6. 6. Where is Java used?
  7. 7. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Android is the markets leading mobile operating system that extensively uses Java. Where is Java used?
  8. 8. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Below are some of the domains that make use of Java: Where is Java used? Financial Services Scientific Research Retail Information Technology Android Stock market Banking Big Data
  9. 9. Features of Java
  10. 10. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Features of Java Distributed RobustDynamic High Performance Simple Object-oriented {OOPS} Portable Secure
  11. 11. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Features of Java Simple Object-oriented {OOPS} DiPortable Secure ➢ Java was designed to be easy for professional programmer to learn and use effectively. ➢ No need to worry about memory management because there is Automatic Garbage Collection in java.
  12. 12. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Features of Java Object-oriented {OOPS} DistributedPortable Secure Dyna ➢ Applications written using Java are portable in the sense that they can be executed on any kind of computer containing any CPU or any operating system.
  13. 13. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Features of Java Object-oriented {OOPS} Distributed RobSecure Dynamic ➢ Java is true object oriented language. ➢ Everything is considered to be an “object” and all operations are performed using these objects.
  14. 14. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Features of Java Distributed RobustSecure Dynamic High P ➢ Java Programs run inside virtual machine sandbox to prevents any activities from untrusted sources. ➢ No use of explicit pointer.
  15. 15. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Features of Java Distributed RobustDynamic High Performance ➢ Java has a feature called Remote Method Invocation (RMI) using which a program can invoke method of another program across a network and get the output.
  16. 16. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Features of Java ➢ Java programs carry with them substantial amounts of run-time type information that is used to verify and resolve accesses to objects at run time. Distributed RobustDynamic High Performance
  17. 17. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Features of Java ➢ Java checks the code during the compilation time and run time also. ➢ Java completely takes care of memory allocation and releasing, which makes the Java program more robust. Distributed RobustDynamic High Performance
  18. 18. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Features of Java ➢ Java achieves high performance through the use of bytecode which can easily translated into native machine code. Distributed RobustDynamic High Performance
  19. 19. Java Environment
  20. 20. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Java Development Kit JDK JRE JVM JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed. JRE (Java Runtime Environment) is a runtime environment which implements JVM and provides all class libraries and other files that JVM uses at runtime. JDK(Java Development Kit) is the tool necessary to compile, document and package Java programs. The JDK completely includes JRE.
  21. 21. How does Java work?
  22. 22. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING How does Java work? Java Source (.java) Java is easy Java C Compiler JIT Compiler Java Interpreter JVM
  23. 23. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING How does Java work? Java Source (.java) Java Compiler Java Bytecode (.class) Compile-time Environment Java Bytecodes move locally or through network Class Loader Bytecode Verifier Java Class Libraries Java Interpreter Just in Time Compiler Runtime System Java Virtual Machine Run-time Environment Operating System Hardware
  24. 24. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Installation
  25. 25. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Java Installation Go to http://www.oracle.com/technetw ork/java/javase/downloads 1 Download Java Platform(JDK) version 8 update 121 and install on your Windows system 2
  26. 26. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Java Installation To set the permanent path of JDK in your system: 1. Begin by going to My Computer Properties. 2. Click on Advanced system setting. 3. Click on Environment Variables option 4. Select Path variable to edit 5. Enter the path to bin folder inside JDK installed on your system.( Default path is C:Program FilesJavajdk1.8.0_121bin ) 1 2 3 4 5
  27. 27. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Go to www.eclipse.org Download Eclipse Neon installer and install on your Windows system 1 2 Eclipse IDE Installation
  28. 28. Data Types in Java
  29. 29. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Data Types in Java Integer BooleanCharacterFloat Primitive Data Type bytelongshort int floatdouble char bool
  30. 30. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Data Types in Java Data Type Value Bytes Required byte -128 to 127 1 short -32768 to 32767 2 int -2147483648 to 2147483647 4 long -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 8 float ±3.40282347E+38F 4 double ±1.79769313486231570E+308 8 char 0 to 65,536 2 boolean true or false 1(bit)
  31. 31. Data Operations in Java
  32. 32. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Data Operators in Java Data Operators Arithmetic Operators Logical Operators Relational operators Unary Operators
  33. 33. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Data Operations in Java Arithmetic operators: Operator Syntax Description + A + B Addition - A – B Subtraction / A / B Division * A * B Multiplication % A % B Modulus – Returns reminder after division
  34. 34. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Data Operations in Java Unary operators: Operator Syntax Description ++ i++ Use the current value of i and then increment the value by 1. ++i Increment the value of i by 1 and then use the new value. -- --i Decrement the value of i by 1 and then use the new value. i-- Use the current value of i and then decrement the value by 1
  35. 35. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Operator Syntax Decryption > X>Y Result is true if X if greater than Y; otherwise is false >= X>=Y Result is true if X if greater than or equal to Y; otherwise is false < X<Y Result is true if X if lesser than Y; otherwise is false <= X<=Y Result is true if X if lesser than or equal Y; otherwise is false == X==Y Result is true if X and Y are equal; otherwise is false != X!=Y Result is true if X and Y are not equal; otherwise is false Data Operations in Java Relational operators:
  36. 36. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Operator Syntax Decryption && False && False False True && False False False && True False True && True True || False || False False True || False True False || True True True || True True Data Operations in Java Logical operators:
  37. 37. Functions In Java
  38. 38. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Functions in Java A function is a block of organized, reusable sets of instructions that is used to perform some related actions. Why do we use functions? ➢Re – usability of code minimizes redundancy ➢Procedural decomposition makes things organized Function Built-in Function User Defined Function
  39. 39. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Syntax: modifier returnType methodName(parameters) { Statements… } Example: public static int add(int a, int b) { int result; result = a + b; return result; } Functions in Java User Defined Function defining function function parameters function return value function call output
  40. 40. Object Oriented Programming
  41. 41. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Objects ➢ Object is simply a collection of data (State) and methods (Behaviour) that act on those data. State: • Color • Size • Shape Behavior: • Power On(); • Call (); • Message ();
  42. 42. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Class ➢ Class is a blueprint from with the object are created. class Phone{ String brand; int batteryPower; String processor; . . public Phone(String phoneBrand, int power, String phoneProcessor) { brand = phoneBrand; Batterpower = power; processor = phoneProcessor; } //Other class methods }
  43. 43. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Super Class Child Class Inheritance ➢ Inheritance is a mechanism through which one object acquires all the properties and behaviors of parent object. Mobile Apple Samsung Google
  44. 44. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Encapsulation ➢ Encapsulation is the mechanism that binds together code and the data it manipulates together. Authorized User Unauthorized User
  45. 45. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Polymorphism ➢ Polymorphism is the ability of a variable, function or object to take on multiple forms. Mobile Camera Remote MP3 Player
  46. 46. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Abstraction ➢ Abstraction is the methodology of hiding the implementation details from the user and only providing the functionality to the users.
  47. 47. Summary
  48. 48. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Session In A Minute Java Introduction Why Learn Java Features of Java Java Environment How does Java work Data Types in Java
  49. 49. ` https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING Session In A Minute Data Operators in Java Functions in Java

×