SlideShare uma empresa Scribd logo
1 de 112
Java Roadmap
 Introduction to Java, History of Java,
 Why we need JAVA?
 compiling and executing a java program, basic
control structures,
 Data types,
 Methods,
 Classes, String, array, container classes
 Data Structure Algorithms
 Exception handling, file handling, Object oriented
programming concepts,
 And Multithreading.
Introduction to Java
 Java is an object oriented Internet Programming
Language which is popular over a globe with his
two major features:
1. Platform Independency
2. Security
Languages
 There are majorly two types of languages.
 one is Statically typed language
 Dynamically typed languages
Java is statically typed and also a strongly typed
language because, in Java, each type of data
(such as integer, character, hexadecimal, packed
decimal, and so forth) is predefined as part of the
programming language and all constants or
variables defined for a given program must be
described with one of the data types.
Data Types
Primitive Data Types
Non-Primitive Data Type or
Reference Data Types
 The Reference Data Types will contain a
memory address of variable value because the
reference types won’t store the variable value
directly in memory. They
are strings, objects, arrays, etc.
 String
 Class
 Object
 Interface
 Array
Java Identifier
 identifiers are used for identification purposes. In
Java, an identifier can be a class name, method
name, variable name, or label.
 For example:
public class Test
{
public static void main(String[] args)
{ int a = 40; } }
Java Identifier
 So, in this example we have 5 identifiers namely :
 Test : class name.
 main : method name.
 String : predefined class name.
 args : variable name.
 a : variable name.
Java Naming Conventions
 Below are some naming conventions of java programming
language. They must be followed while developing software in
java for good maintenance and readability of code. Java uses
CamelCase as a practice for writing names of methods,
variables, classes, packages and constants.
 Camel case in Java Programming : It consists of compound
words or phrases such that each word or abbreviation begins
with a capital letter or first word with a lowercase letter, rest all
with capital.
 Constant variables:Should be all uppercase with words
separated by underscores (“_”).
There are various constants used in predefined classes like Float,
Long, String etc.
 Packages:The prefix of a unique package name is always
written in all-lowercase ASCII letters and should be one of the
top-level domain names, like com, edu, gov, mil, net, org.
Subsequent components of the package name vary according to
an organisation’s own internal naming conventions.Examples:
com.sun.eng com.apple.quicktime.v2 // java.lang packet in JDK
java.lang
Variables in Java
 A variable is a name given to a memory location.
It is the basic unit of storage in a program.
 The value stored in a variable can be changed
during program execution.
 A variable is only a name given to a memory
location, all the operations done on the variable
effects that memory location.
 In Java, all the variables must be declared before
use.
 Varible Declaration:
 Initialization
Types of variables
 There are three types of variables in Java:
 Local Variables
 Instance Variables
 Static Variables
Scope of Variables In Java
 Member Variables (Class Level Scope)
 Local Variables (Method Level Scope)
 Loop Variables (Block Scope)
 Some Important Points about Variable scope in Java:
 In general, a set of curly brackets { } defines a scope.
 In Java we can usually access a variable as long as it was
defined within the same set of brackets as the code we are
writing or within any curly brackets inside of the curly brackets
where the variable was defined.
 Any variable defined in a class outside of any method can be
used by all member methods.
 When a method has the same local variable as a member,
“this” keyword can be used to reference the current class
variable.
 For a variable to be read after the termination of a loop, It must
be declared before the body of the loop.
Blank Final Variable in Java
 A final variable in Java can be assigned a value
only once, we can assign a value either in
declaration or later.
 final int i = 10; i = 30; // Error because i is
final.A blank final variable in Java is
a final variable that is not initialized during
declaration. Below is a simple example of blank
final.
 // A simple blank final example
 final int i; i = 30;
Loops in Java
 Looping in programming languages is a feature
which facilitates the execution of a set of
instructions/functions repeatedly while some
condition evaluates to true.
Java provides three ways for executing the loops.
While all the ways provide similar basic
functionality, they differ in their syntax and
condition checking time.
 while loop:
 For Loop
 Do-While Loop
While Loop
A while loop is a control
flow statement that allows
code to be executed
repeatedly based on a
given Boolean condition.
The while loop can be
thought of as a repeating
if statement.
For Loop
for loop provides a concise way of writing the loop structure.
Unlike a while loop, a for statement consumes the
initialization, condition and increment/decrement in one line
thereby providing a shorter, easy to debug structure of
looping.
do while:
do while loop is similar to while loop with only difference
that it checks for condition after executing the
statements, and therefore is an example of Exit Control
Loop.
Infinite Loop
Infinite loop: One of the most common mistakes while
implementing any sort of looping is that that it may not ever
exit, that is the loop runs for infinite time. This happens when
the condition fails for some reason.
Parameter
public static int abc(int a, int b)
{
return a + b;
}
Arguments
int sum = abc(x, y);
for (i = 1; i <= n; i++) {
// left part of pattern
/*printing incremental numbers*/
for (j = 1; j <= (n - i + 1); j++) {
System.out.print(j + " ");
}
/*print spaces*/
for (int k = 0; k < 4 * (i - 1); k++) {
System.out.print(" ");
}
/* right part of the pattern*/
//printing decremental numbers
for (int l = (n - i + 1); l >= 1; l--) {
System.out.print(l + " ");
}
System.out.println();
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx
Java_Roadmap.pptx

Mais conteúdo relacionado

Semelhante a Java_Roadmap.pptx

Let's start with Java- Basic Concepts
Let's start with Java- Basic ConceptsLet's start with Java- Basic Concepts
Let's start with Java- Basic ConceptsAashish Jain
 
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptxINDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptxIndu65
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java ProgrammingMath-Circle
 
Java Basics Presentation
Java Basics PresentationJava Basics Presentation
Java Basics PresentationOmid Sohrabi
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objectsvmadan89
 
Java questions and answers jan bask.net
Java questions and answers jan bask.netJava questions and answers jan bask.net
Java questions and answers jan bask.netJanbask ItTraining
 
Java interview questions and answers for cognizant By Data Council Pune
Java interview questions and answers for cognizant By Data Council PuneJava interview questions and answers for cognizant By Data Council Pune
Java interview questions and answers for cognizant By Data Council PunePankaj kshirsagar
 
Enumerations in java.pptx
Enumerations in java.pptxEnumerations in java.pptx
Enumerations in java.pptxSrizan Pokrel
 
Bt0074 oops with java2
Bt0074 oops with java2Bt0074 oops with java2
Bt0074 oops with java2Techglyphs
 
OCA Java SE 8 Exam Chapter 1 Java Building Blocks
OCA Java SE 8 Exam Chapter 1 Java Building BlocksOCA Java SE 8 Exam Chapter 1 Java Building Blocks
OCA Java SE 8 Exam Chapter 1 Java Building Blocksİbrahim Kürce
 
Unit of competency
Unit of competencyUnit of competency
Unit of competencyloidasacueza
 

Semelhante a Java_Roadmap.pptx (20)

Let's start with Java- Basic Concepts
Let's start with Java- Basic ConceptsLet's start with Java- Basic Concepts
Let's start with Java- Basic Concepts
 
java notes.pdf
java notes.pdfjava notes.pdf
java notes.pdf
 
Intro to Scala
 Intro to Scala Intro to Scala
Intro to Scala
 
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptxINDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
 
Concepts of core java
Concepts of core javaConcepts of core java
Concepts of core java
 
Java features
Java featuresJava features
Java features
 
java
java java
java
 
Viva file
Viva fileViva file
Viva file
 
Java Basics Presentation
Java Basics PresentationJava Basics Presentation
Java Basics Presentation
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
 
Java questions and answers jan bask.net
Java questions and answers jan bask.netJava questions and answers jan bask.net
Java questions and answers jan bask.net
 
Java interview questions and answers for cognizant By Data Council Pune
Java interview questions and answers for cognizant By Data Council PuneJava interview questions and answers for cognizant By Data Council Pune
Java interview questions and answers for cognizant By Data Council Pune
 
Enumerations in java.pptx
Enumerations in java.pptxEnumerations in java.pptx
Enumerations in java.pptx
 
Bt0074 oops with java2
Bt0074 oops with java2Bt0074 oops with java2
Bt0074 oops with java2
 
OCA Java SE 8 Exam Chapter 1 Java Building Blocks
OCA Java SE 8 Exam Chapter 1 Java Building BlocksOCA Java SE 8 Exam Chapter 1 Java Building Blocks
OCA Java SE 8 Exam Chapter 1 Java Building Blocks
 
Unit of competency
Unit of competencyUnit of competency
Unit of competency
 
Java basic concept
Java basic conceptJava basic concept
Java basic concept
 
Core_Java_Interview.pdf
Core_Java_Interview.pdfCore_Java_Interview.pdf
Core_Java_Interview.pdf
 
Java Tokens
Java  TokensJava  Tokens
Java Tokens
 

Último

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 

Último (20)

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 

Java_Roadmap.pptx

  • 2.  Introduction to Java, History of Java,  Why we need JAVA?  compiling and executing a java program, basic control structures,  Data types,  Methods,  Classes, String, array, container classes  Data Structure Algorithms  Exception handling, file handling, Object oriented programming concepts,  And Multithreading.
  • 3. Introduction to Java  Java is an object oriented Internet Programming Language which is popular over a globe with his two major features: 1. Platform Independency 2. Security
  • 4.
  • 5. Languages  There are majorly two types of languages.  one is Statically typed language  Dynamically typed languages Java is statically typed and also a strongly typed language because, in Java, each type of data (such as integer, character, hexadecimal, packed decimal, and so forth) is predefined as part of the programming language and all constants or variables defined for a given program must be described with one of the data types.
  • 8. Non-Primitive Data Type or Reference Data Types  The Reference Data Types will contain a memory address of variable value because the reference types won’t store the variable value directly in memory. They are strings, objects, arrays, etc.  String  Class  Object  Interface  Array
  • 9. Java Identifier  identifiers are used for identification purposes. In Java, an identifier can be a class name, method name, variable name, or label.  For example: public class Test { public static void main(String[] args) { int a = 40; } }
  • 10. Java Identifier  So, in this example we have 5 identifiers namely :  Test : class name.  main : method name.  String : predefined class name.  args : variable name.  a : variable name.
  • 11. Java Naming Conventions  Below are some naming conventions of java programming language. They must be followed while developing software in java for good maintenance and readability of code. Java uses CamelCase as a practice for writing names of methods, variables, classes, packages and constants.  Camel case in Java Programming : It consists of compound words or phrases such that each word or abbreviation begins with a capital letter or first word with a lowercase letter, rest all with capital.  Constant variables:Should be all uppercase with words separated by underscores (“_”). There are various constants used in predefined classes like Float, Long, String etc.  Packages:The prefix of a unique package name is always written in all-lowercase ASCII letters and should be one of the top-level domain names, like com, edu, gov, mil, net, org. Subsequent components of the package name vary according to an organisation’s own internal naming conventions.Examples: com.sun.eng com.apple.quicktime.v2 // java.lang packet in JDK java.lang
  • 12. Variables in Java  A variable is a name given to a memory location. It is the basic unit of storage in a program.  The value stored in a variable can be changed during program execution.  A variable is only a name given to a memory location, all the operations done on the variable effects that memory location.  In Java, all the variables must be declared before use.  Varible Declaration:  Initialization
  • 13. Types of variables  There are three types of variables in Java:  Local Variables  Instance Variables  Static Variables
  • 14. Scope of Variables In Java  Member Variables (Class Level Scope)  Local Variables (Method Level Scope)  Loop Variables (Block Scope)  Some Important Points about Variable scope in Java:  In general, a set of curly brackets { } defines a scope.  In Java we can usually access a variable as long as it was defined within the same set of brackets as the code we are writing or within any curly brackets inside of the curly brackets where the variable was defined.  Any variable defined in a class outside of any method can be used by all member methods.  When a method has the same local variable as a member, “this” keyword can be used to reference the current class variable.  For a variable to be read after the termination of a loop, It must be declared before the body of the loop.
  • 15. Blank Final Variable in Java  A final variable in Java can be assigned a value only once, we can assign a value either in declaration or later.  final int i = 10; i = 30; // Error because i is final.A blank final variable in Java is a final variable that is not initialized during declaration. Below is a simple example of blank final.  // A simple blank final example  final int i; i = 30;
  • 16. Loops in Java  Looping in programming languages is a feature which facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true. Java provides three ways for executing the loops. While all the ways provide similar basic functionality, they differ in their syntax and condition checking time.  while loop:  For Loop  Do-While Loop
  • 17. While Loop A while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if statement.
  • 18. For Loop for loop provides a concise way of writing the loop structure. Unlike a while loop, a for statement consumes the initialization, condition and increment/decrement in one line thereby providing a shorter, easy to debug structure of looping.
  • 19. do while: do while loop is similar to while loop with only difference that it checks for condition after executing the statements, and therefore is an example of Exit Control Loop.
  • 20. Infinite Loop Infinite loop: One of the most common mistakes while implementing any sort of looping is that that it may not ever exit, that is the loop runs for infinite time. This happens when the condition fails for some reason.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51. Parameter public static int abc(int a, int b) { return a + b; }
  • 52. Arguments int sum = abc(x, y);
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93. for (i = 1; i <= n; i++) { // left part of pattern /*printing incremental numbers*/ for (j = 1; j <= (n - i + 1); j++) { System.out.print(j + " "); } /*print spaces*/ for (int k = 0; k < 4 * (i - 1); k++) { System.out.print(" "); } /* right part of the pattern*/ //printing decremental numbers for (int l = (n - i + 1); l >= 1; l--) { System.out.print(l + " "); } System.out.println();