SlideShare a Scribd company logo
1 of 15
Introduction Methods
What is a  Method ? ,[object Object],[object Object],[object Object],[object Object]
Why Use Methods? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Declaring and  Creating  Methods
Declaring and  Creating  Methods ,[object Object],[object Object],[object Object],public  static void  printLogo ()   { System.out.println("FunSoft Corp."); System.out.println ("www.funsoft.bg"); }
Declaring and  Creating  Methods (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],public s tatic void   p rintLogo( )  { System.out.println("FunSoft Corp."); System.out.println ("www.funsoft.bg"); }
Declaring and  Creating  Methods (3) ,[object Object],[object Object],[object Object],public  static void printLogo()   { System.out.println("FunSoft Corp."); System.out.println("www.funsoft.bg"); }
Using Parameters Defining and Using Method Parameters
Method  Parameters ,[object Object],[object Object],[object Object],[object Object]
Defining and Using  Method Parameters ,[object Object],[object Object],[object Object],[object Object],public static void printSign( int number )   { if ( number  > 0) System.out.println(&quot;Positive&quot;); else if ( number  < 0) System.out.println(&quot;Negative&quot;); else System.out.println(&quot;Zero&quot;); }
Returning Values From Methods
Returning Values From Methods ,[object Object],[object Object],[object Object],[object Object],[object Object],String message = input.nextLine(); // input.nextLine() returns a string float price =  g etPrice ()  * quantity * 1.20; System.out.println( input.nextLine() ) ;
Creating a Method That Returns a Value ,[object Object],[object Object],[object Object],[object Object],public static  int  multiply(int number1, int number2) { return  number1 * number2; }
return  Statement ,[object Object],[object Object],[object Object],[object Object],[object Object]
Questions ? Methods – Introduction

More Related Content

What's hot

Introduction To Algorithm [2]
Introduction To Algorithm [2]Introduction To Algorithm [2]
Introduction To Algorithm [2]
ecko_disasterz
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
Hattori Sidek
 

What's hot (17)

this in c#
this in c#this in c#
this in c#
 
Introduction To Algorithm [2]
Introduction To Algorithm [2]Introduction To Algorithm [2]
Introduction To Algorithm [2]
 
Compiler lab final report writing
Compiler lab final report writingCompiler lab final report writing
Compiler lab final report writing
 
User Defined Functions in C Language
User Defined Functions   in  C LanguageUser Defined Functions   in  C Language
User Defined Functions in C Language
 
SPL 4 | printf in C
SPL 4 | printf in CSPL 4 | printf in C
SPL 4 | printf in C
 
Python-02| Input, Output & Import
Python-02| Input, Output & ImportPython-02| Input, Output & Import
Python-02| Input, Output & Import
 
Main topic 3 problem solving and office automation
Main topic 3 problem solving and office automationMain topic 3 problem solving and office automation
Main topic 3 problem solving and office automation
 
Ch3 repetition
Ch3 repetitionCh3 repetition
Ch3 repetition
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
 
Flag Waiving
Flag WaivingFlag Waiving
Flag Waiving
 
Ch3 selection
Ch3 selectionCh3 selection
Ch3 selection
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
 
Ch03
Ch03Ch03
Ch03
 
Ch05
Ch05Ch05
Ch05
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
 
Ch06
Ch06Ch06
Ch06
 
Input processing and output in Python
Input processing and output in PythonInput processing and output in Python
Input processing and output in Python
 

Viewers also liked

Grafico diario del dax perfomance index para el 07 11-2012
Grafico diario del dax perfomance index para el 07 11-2012Grafico diario del dax perfomance index para el 07 11-2012
Grafico diario del dax perfomance index para el 07 11-2012
Experiencia Trading
 
日本語テスト 空白あり
日本語テスト 空白あり日本語テスト 空白あり
日本語テスト 空白あり
jt_test
 
Презентация устройства "Корден"
Презентация устройства "Корден"Презентация устройства "Корден"
Презентация устройства "Корден"
kulibin
 

Viewers also liked (20)

Grafico diario del dax perfomance index para el 07 11-2012
Grafico diario del dax perfomance index para el 07 11-2012Grafico diario del dax perfomance index para el 07 11-2012
Grafico diario del dax perfomance index para el 07 11-2012
 
Καινοτομια
ΚαινοτομιαΚαινοτομια
Καινοτομια
 
日本語テスト 空白あり
日本語テスト 空白あり日本語テスト 空白あり
日本語テスト 空白あり
 
World Economic Forum on Africa 2006
World Economic Forum on Africa 2006World Economic Forum on Africa 2006
World Economic Forum on Africa 2006
 
Leveraging Social Media Tools
Leveraging Social Media ToolsLeveraging Social Media Tools
Leveraging Social Media Tools
 
Teatro s. XVII
Teatro s. XVIITeatro s. XVII
Teatro s. XVII
 
Code iscool
Code iscoolCode iscool
Code iscool
 
ChefConf2014 - Chef TDD
ChefConf2014 - Chef TDD ChefConf2014 - Chef TDD
ChefConf2014 - Chef TDD
 
Digitalisaatio ja valtioneuvosto
Digitalisaatio ja valtioneuvostoDigitalisaatio ja valtioneuvosto
Digitalisaatio ja valtioneuvosto
 
LESTER_ANTONY_FRANCIS ( Aug 2016)
LESTER_ANTONY_FRANCIS ( Aug 2016)LESTER_ANTONY_FRANCIS ( Aug 2016)
LESTER_ANTONY_FRANCIS ( Aug 2016)
 
Talk nerdy to me!
Talk nerdy to me!Talk nerdy to me!
Talk nerdy to me!
 
Adobe Flash, entre el amor y el odio
Adobe Flash, entre el amor y el odioAdobe Flash, entre el amor y el odio
Adobe Flash, entre el amor y el odio
 
There's No Crying In Local Search
There's No Crying In Local SearchThere's No Crying In Local Search
There's No Crying In Local Search
 
Defining classes-and-objects-1.0
Defining classes-and-objects-1.0Defining classes-and-objects-1.0
Defining classes-and-objects-1.0
 
On the frontier of genotype-2-phenotype data integration
On the frontier of genotype-2-phenotype data integrationOn the frontier of genotype-2-phenotype data integration
On the frontier of genotype-2-phenotype data integration
 
Презентация устройства "Корден"
Презентация устройства "Корден"Презентация устройства "Корден"
Презентация устройства "Корден"
 
Espirometría
EspirometríaEspirometría
Espirometría
 
About the-course
About the-courseAbout the-course
About the-course
 
書籍市場の現状
書籍市場の現状書籍市場の現状
書籍市場の現状
 
Estudiante virtual exioso
Estudiante virtual exiosoEstudiante virtual exioso
Estudiante virtual exioso
 

Similar to Methods intro-1.0

import java.util.Scanner;Henry Cutler ID 1234 7202.docx
import java.util.Scanner;Henry Cutler ID 1234  7202.docximport java.util.Scanner;Henry Cutler ID 1234  7202.docx
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
wilcockiris
 
Chapter 2.4
Chapter 2.4Chapter 2.4
Chapter 2.4
sotlsoc
 

Similar to Methods intro-1.0 (20)

Java Foundations: Methods
Java Foundations: MethodsJava Foundations: Methods
Java Foundations: Methods
 
09. Java Methods
09. Java Methods09. Java Methods
09. Java Methods
 
09. Methods
09. Methods09. Methods
09. Methods
 
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
import java.util.Scanner;Henry Cutler ID 1234  7202.docximport java.util.Scanner;Henry Cutler ID 1234  7202.docx
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
 
Chapter 2.4
Chapter 2.4Chapter 2.4
Chapter 2.4
 
Methods in Java
Methods in JavaMethods in Java
Methods in Java
 
11. java methods
11. java methods11. java methods
11. java methods
 
static methods
static methodsstatic methods
static methods
 
Working with Methods in Java.pptx
Working with Methods in Java.pptxWorking with Methods in Java.pptx
Working with Methods in Java.pptx
 
Subprogramms
SubprogrammsSubprogramms
Subprogramms
 
Xamarin: C# Methods
Xamarin: C# MethodsXamarin: C# Methods
Xamarin: C# Methods
 
14method in c#
14method in c#14method in c#
14method in c#
 
Module 4 : methods & parameters
Module 4 : methods & parametersModule 4 : methods & parameters
Module 4 : methods & parameters
 
Methods In C-Sharp (C#)
Methods In C-Sharp (C#)Methods In C-Sharp (C#)
Methods In C-Sharp (C#)
 
Class 10
Class 10Class 10
Class 10
 
Intake 38 2
Intake 38 2Intake 38 2
Intake 38 2
 
Java method
Java methodJava method
Java method
 
Csphtp1 06
Csphtp1 06Csphtp1 06
Csphtp1 06
 
Psuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxPsuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptx
 
Computer programming 2 Lesson 15
Computer programming 2  Lesson 15Computer programming 2  Lesson 15
Computer programming 2 Lesson 15
 

More from BG Java EE Course

Java Server Faces (JSF) - advanced
Java Server Faces (JSF) - advancedJava Server Faces (JSF) - advanced
Java Server Faces (JSF) - advanced
BG Java EE Course
 
JavaScript and jQuery Fundamentals
JavaScript and jQuery FundamentalsJavaScript and jQuery Fundamentals
JavaScript and jQuery Fundamentals
BG Java EE Course
 
Creating Web Sites with HTML and CSS
Creating Web Sites with HTML and CSSCreating Web Sites with HTML and CSS
Creating Web Sites with HTML and CSS
BG Java EE Course
 

More from BG Java EE Course (20)

Rich faces
Rich facesRich faces
Rich faces
 
JSP Custom Tags
JSP Custom TagsJSP Custom Tags
JSP Custom Tags
 
Java Server Faces (JSF) - advanced
Java Server Faces (JSF) - advancedJava Server Faces (JSF) - advanced
Java Server Faces (JSF) - advanced
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
JSTL
JSTLJSTL
JSTL
 
Unified Expression Language
Unified Expression LanguageUnified Expression Language
Unified Expression Language
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and Deployment
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
CSS
CSSCSS
CSS
 
HTML: Tables and Forms
HTML: Tables and FormsHTML: Tables and Forms
HTML: Tables and Forms
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
WWW and HTTP
WWW and HTTPWWW and HTTP
WWW and HTTP
 
JavaScript and jQuery Fundamentals
JavaScript and jQuery FundamentalsJavaScript and jQuery Fundamentals
JavaScript and jQuery Fundamentals
 
Creating Web Sites with HTML and CSS
Creating Web Sites with HTML and CSSCreating Web Sites with HTML and CSS
Creating Web Sites with HTML and CSS
 
Processing XML with Java
Processing XML with JavaProcessing XML with Java
Processing XML with Java
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Data Access with JDBC
Data Access with JDBCData Access with JDBC
Data Access with JDBC
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
 
Introduction to-RDBMS-systems
Introduction to-RDBMS-systemsIntroduction to-RDBMS-systems
Introduction to-RDBMS-systems
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Recently uploaded (20)

Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 

Methods intro-1.0

Editor's Notes

  1. * 10/16/10 07/16/96 (c) 2005 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.* ##
  2. * 10/16/10 07/16/96 (c) 2005 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.* ##
  3. * 10/16/10 07/16/96 (c) 2005 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.* ##
  4. * 10/16/10 07/16/96 (c) 2005 National Academy for Software Development - http://academy.devbg.org. All rights reserved. Unauthorized copying or re-distribution is strictly prohibited.* ##