SlideShare uma empresa Scribd logo
1 de 19
Learn To Read Java
In under an hour!
Speaker todaysSpeaker = Molly Rand;
Speaker todaysSpeaker = Molly Rand;
Notes:
Become an Android Developer From Scratch is the Udemy course created by
the guys who trained me. You can find it online here:
https://www.udemy.com/become-an-android-developer-from-scratch/, and if you
don’t want to pay full price there’s a promo code on my blog at
codemolly.tumblr.com. Please feel free to tweet at me or hit me up on my blog if
you want to connect/ have questions about Android programming from a noob’s
perspective.
CODE STRUCTURE
Hallmarks of Java
• Object Oriented
• Static typing
• Libraries
• Mature Platform
Hallmarks of Java
• Object Oriented
• Static typing
• Libraries
• Mature Platform
Notes:
This is a great article my mentor shared on one coder’s
opinions about why he likes Java:
http://stevewedig.com/2014/02/17/why-and-how-i-write-
java/
Code
Components
File
Class
Attributes
Methods
Code
Components
File
Class
Attributes
Methods
Notes:
Your file name should match your class name (it’s convention, and a really
good one). The package at the top of the file lets you know what files are
grouped together in a single project.
Attributes are like the nouns/adjectives. They tell you what your class has
and describe it.
Methods are like your verbs – they tell you what objects of that class can do
and how they do it.
JAVA GRAMMAR
Clues in the Case
• PascalCase
• Used for class names
• Found in class signature and variable declarations (data type)
• camelCase
• Variables and method names
• snake_case
• Mainly seen in built-in static variables (constants)
• Also XML in Android programming
Notes:
Curly braces are your biggest indicator when deciphering Java
code. If you can separate the code into blocks you reduce your
cognitive load and can deal with the file one small piece at a
time.
Semicolons come at the end of every java statement – important
to note because sometimes one statement will take up multiple
lines, or less often you may have multiple statements on a single
line
Parentheses in a method signature (next slide) tell you what that
method needs as input in order to run. When a method is called,
those input parameters go in the parentheses of the method call.
Brackets are used when denoting that you are creating an array,
and when accessing individual elements of an array.
Operators are used in mathematical expressions and logic
comparisons.
Notes:
This is a Java method signature – where a method (action an object of a class can
take) is defined.
The accessibility keyword denotes who can call this method. Public methods can be
called by objects wherever they’re created. Private methods can only be called
internally within the class. Protected methods are more complicated, but worth some
research if you really want to get into Java.
The return type is the data type you will get back when the method is run. A return
type of void simply means that the code within the method will run, but you won’t
have any kind of object returned to you (maybe variables within the object change,
maybe something happens on your screen). If the return type is not void, there must
be a statement within the method’s code block (between the curly braces) that
returns a variable of that type.
Parameters have a declared type and variable name. The type is because Java is a
statically typed language, and the variable name is so that we can use the
parameter within this method without having to know what it’s called anywhere else
in the code. This is super handy for making modular, reusable code. Methods can
have 0, 1, or many parameters of any number of data types.
Any method that has a signature like this can then be called on objects of its
class. A method call looks like variableName.methodName(parameter);
Passing in the wrong number or type of parameters will result in a compile-time
error. If a method signature has a return type other than void, you’ll typically
want to assign that method call to a variable of the corresponding type. For
example: if my method is public boolean isTrue(){ } then simply calling
variable.isTrue(); won’t do anything. I need to say boolean truth =
variable.isTrue(); and then I can use truth in logic tests in later code statements.
LET’S LOOK AT SOME
CODE!
Method Signature
Block of code
Parameter is an object of
the NoteSlide class
(Defined in the same project)
Method name is
slideTime
Returns a String
Method Signature
Block of code
Declaring variables
of type int
Calling method valueOf which takes
a single int as a parameter and
returns a String

Mais conteúdo relacionado

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"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 ...
 
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...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

Destaque

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

Destaque (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Read Java in Under an Hour

  • 1. Learn To Read Java In under an hour!
  • 3. Speaker todaysSpeaker = Molly Rand; Notes: Become an Android Developer From Scratch is the Udemy course created by the guys who trained me. You can find it online here: https://www.udemy.com/become-an-android-developer-from-scratch/, and if you don’t want to pay full price there’s a promo code on my blog at codemolly.tumblr.com. Please feel free to tweet at me or hit me up on my blog if you want to connect/ have questions about Android programming from a noob’s perspective.
  • 5. Hallmarks of Java • Object Oriented • Static typing • Libraries • Mature Platform
  • 6. Hallmarks of Java • Object Oriented • Static typing • Libraries • Mature Platform Notes: This is a great article my mentor shared on one coder’s opinions about why he likes Java: http://stevewedig.com/2014/02/17/why-and-how-i-write- java/
  • 8. Code Components File Class Attributes Methods Notes: Your file name should match your class name (it’s convention, and a really good one). The package at the top of the file lets you know what files are grouped together in a single project. Attributes are like the nouns/adjectives. They tell you what your class has and describe it. Methods are like your verbs – they tell you what objects of that class can do and how they do it.
  • 10. Clues in the Case • PascalCase • Used for class names • Found in class signature and variable declarations (data type) • camelCase • Variables and method names • snake_case • Mainly seen in built-in static variables (constants) • Also XML in Android programming
  • 11.
  • 12. Notes: Curly braces are your biggest indicator when deciphering Java code. If you can separate the code into blocks you reduce your cognitive load and can deal with the file one small piece at a time. Semicolons come at the end of every java statement – important to note because sometimes one statement will take up multiple lines, or less often you may have multiple statements on a single line Parentheses in a method signature (next slide) tell you what that method needs as input in order to run. When a method is called, those input parameters go in the parentheses of the method call. Brackets are used when denoting that you are creating an array, and when accessing individual elements of an array. Operators are used in mathematical expressions and logic comparisons.
  • 13.
  • 14. Notes: This is a Java method signature – where a method (action an object of a class can take) is defined. The accessibility keyword denotes who can call this method. Public methods can be called by objects wherever they’re created. Private methods can only be called internally within the class. Protected methods are more complicated, but worth some research if you really want to get into Java. The return type is the data type you will get back when the method is run. A return type of void simply means that the code within the method will run, but you won’t have any kind of object returned to you (maybe variables within the object change, maybe something happens on your screen). If the return type is not void, there must be a statement within the method’s code block (between the curly braces) that returns a variable of that type. Parameters have a declared type and variable name. The type is because Java is a statically typed language, and the variable name is so that we can use the parameter within this method without having to know what it’s called anywhere else in the code. This is super handy for making modular, reusable code. Methods can have 0, 1, or many parameters of any number of data types.
  • 15. Any method that has a signature like this can then be called on objects of its class. A method call looks like variableName.methodName(parameter); Passing in the wrong number or type of parameters will result in a compile-time error. If a method signature has a return type other than void, you’ll typically want to assign that method call to a variable of the corresponding type. For example: if my method is public boolean isTrue(){ } then simply calling variable.isTrue(); won’t do anything. I need to say boolean truth = variable.isTrue(); and then I can use truth in logic tests in later code statements.
  • 16. LET’S LOOK AT SOME CODE!
  • 17. Method Signature Block of code Parameter is an object of the NoteSlide class (Defined in the same project) Method name is slideTime Returns a String
  • 19. Declaring variables of type int Calling method valueOf which takes a single int as a parameter and returns a String

Notas do Editor

  1. Become an Android Developer From Scratch is the Udemy course created by the guys who trained me. You can find it online here: https://www.udemy.com/become-an-android-developer-from-scratch/, and if you don’t want to pay full price there’s a promo code on my blog at codemolly.tumblr.com. Please feel free to tweet at me or hit me up on my blog if you want to connect/ have questions about Android programming from a noob’s perspective.
  2. Become an Android Developer From Scratch is the Udemy course created by the guys who trained me. You can find it online here: https://www.udemy.com/become-an-android-developer-from-scratch/, and if you don’t want to pay full price there’s a promo code on my blog at codemolly.tumblr.com. Please feel free to tweet at me or hit me up on my blog if you want to connect/ have questions about Android programming from a noob’s perspective.
  3. This is a great article my mentor shared on one coder’s opinions about why he likes Java: http://stevewedig.com/2014/02/17/why-and-how-i-write-java/
  4. This is a great article my mentor shared on one coder’s opinions about why he likes Java: http://stevewedig.com/2014/02/17/why-and-how-i-write-java/
  5. Your file name should match your class name (it’s convention, and a really good one). The package at the top of the file lets you know what files are grouped together in a single project.Attributes are like the nouns/adjectives. They tell you what your class has and describe it.Methods are like your verbs – they tell you what objects of that class can do and how they do it.
  6. Your file name should match your class name (it’s convention, and a really good one). The package at the top of the file lets you know what files are grouped together in a single project.Attributes are like the nouns/adjectives. They tell you what your class has and describe it.Methods are like your verbs – they tell you what objects of that class can do and how they do it.
  7. PascalCase is used for class names. If you see a word in PascalCase, it’s either going to be in a class signature or it’s going to denote a variable’s class (i.e. its data type)camelCase is used for variables and method names.snake_case is mainly seen in built-in static variables (constants). And in XML in Android programming.
  8. Curly braces are your biggest indicator when deciphering Java code. If you can separate the code into blocks you reduce your cognitive load and can deal with the file one small piece at a time.Semicolons come at the end of every java statement – important to note because sometimes one statement will take up multiple lines, or less often you may have multiple statements on a single lineParentheses in a method signature (next slide) tell you what that method needs as input in order to run. When a method is called, those input parameters go in the parentheses of the method call.Brackets are used when denoting that you are creating an array, and when accessing individual elements of an array.Operators are used in mathematical expressions and logic comparisons.
  9. Curly braces are your biggest indicator when deciphering Java code. If you can separate the code into blocks you reduce your cognitive load and can deal with the file one small piece at a time.Semicolons come at the end of every java statement – important to note because sometimes one statement will take up multiple lines, or less often you may have multiple statements on a single lineParentheses in a method signature (next slide) tell you what that method needs as input in order to run. When a method is called, those input parameters go in the parentheses of the method call.Brackets are used when denoting that you are creating an array, and when accessing individual elements of an array.Operators are used in mathematical expressions and logic comparisons.
  10. This is a Java method signature – where a method (action an object of a class can take) is defined. The accessibility keyword denotes who can call this method. Public methods can be called by objects wherever they’re created. Private methods can only be called internally within the class. Protected methods are more complicated, but worth some research if you really want to get into Java.The return type is the data type you will get back when the method is run. A return type of void simply means that the code within the method will run, but you won’t have any kind of object returned to you (maybe variables within the object change, maybe something happens on your screen). If the return type is not void, there must be a statement within the method’s code block (between the curly braces) that returns a variable of that type.Parameters have a declared type and variable name. The type is because Java is a statically typed language, and the variable name is so that we can use the parameter within this method without having to know what it’s called anywhere else in the code. This is super handy for making modular, reusable code. Methods can have 0, 1, or many parameters of any number of data types.Any method that has a signature like this can then be called on objects of its class. A method call looks like variableName.methodName(parameter); Passing in the wrong number or type of parameters will result in a compile-time error. If a method signature has a return type other than void, you’ll typically want to assign that method call to a variable of the corresponding type. For example: if my method is public booleanisTrue(){ } then simply calling variable.isTrue(); won’t do anything. I need to say boolean truth = variable.isTrue(); and then I can use truth in logic tests in later code statements.
  11. This is a Java method signature – where a method (action an object of a class can take) is defined. The accessibility keyword denotes who can call this method. Public methods can be called by objects wherever they’re created. Private methods can only be called internally within the class. Protected methods are more complicated, but worth some research if you really want to get into Java.The return type is the data type you will get back when the method is run. A return type of void simply means that the code within the method will run, but you won’t have any kind of object returned to you (maybe variables within the object change, maybe something happens on your screen). If the return type is not void, there must be a statement within the method’s code block (between the curly braces) that returns a variable of that type.Parameters have a declared type and variable name. The type is because Java is a statically typed language, and the variable name is so that we can use the parameter within this method without having to know what it’s called anywhere else in the code. This is super handy for making modular, reusable code. Methods can have 0, 1, or many parameters of any number of data types.Any method that has a signature like this can then be called on objects of its class. A method call looks like variableName.methodName(parameter); Passing in the wrong number or type of parameters will result in a compile-time error. If a method signature has a return type other than void, you’ll typically want to assign that method call to a variable of the corresponding type. For example: if my method is public booleanisTrue(){ } then simply calling variable.isTrue(); won’t do anything. I need to say boolean truth = variable.isTrue(); and then I can use truth in logic tests in later code statements.
  12. This is a Java method signature – where a method (action an object of a class can take) is defined. The accessibility keyword denotes who can call this method. Public methods can be called by objects wherever they’re created. Private methods can only be called internally within the class. Protected methods are more complicated, but worth some research if you really want to get into Java.The return type is the data type you will get back when the method is run. A return type of void simply means that the code within the method will run, but you won’t have any kind of object returned to you (maybe variables within the object change, maybe something happens on your screen). If the return type is not void, there must be a statement within the method’s code block (between the curly braces) that returns a variable of that type.Parameters have a declared type and variable name. The type is because Java is a statically typed language, and the variable name is so that we can use the parameter within this method without having to know what it’s called anywhere else in the code. This is super handy for making modular, reusable code. Methods can have 0, 1, or many parameters of any number of data types.Any method that has a signature like this can then be called on objects of its class. A method call looks like variableName.methodName(parameter); Passing in the wrong number or type of parameters will result in a compile-time error. If a method signature has a return type other than void, you’ll typically want to assign that method call to a variable of the corresponding type. For example: if my method is public booleanisTrue(){ } then simply calling variable.isTrue(); won’t do anything. I need to say boolean truth = variable.isTrue(); and then I can use truth in logic tests in later code statements.