Difference between revisions of "Calling Methods"
From CompSciWiki
Line 1: | Line 1: | ||
{{1010Chapter|ChapterNum=3 | {{1010Chapter|ChapterNum=3 | ||
+ | |Picture=Wiki_method01.jpg | ||
|Introduction=Calling a method is like getting a screwdriver out of a toolbox labeled "screwdrivers" and using it to solve your problem. For instance, whenever JOptionPane.showInputDialog is called in Java, you are really telling Java to run the "tool" named showInputDialog which is located in the JOptionPane "toolbox". | |Introduction=Calling a method is like getting a screwdriver out of a toolbox labeled "screwdrivers" and using it to solve your problem. For instance, whenever JOptionPane.showInputDialog is called in Java, you are really telling Java to run the "tool" named showInputDialog which is located in the JOptionPane "toolbox". | ||
Revision as of 16:29, 10 August 2010
Chapter 3Calling a method is like getting a screwdriver out of a toolbox labeled "screwdrivers" and using it to solve your problem. For instance, whenever JOptionPane.showInputDialog is called in Java, you are really telling Java to run the "tool" named showInputDialog which is located in the JOptionPane "toolbox". You can write your own methods as well, although this will be discussed later. For a full list of all the predefined methods, visit The Java API. This section demonstrates some predefined methods that are useful. | ||
---|---|---|
Write a Program a Day | Case Studies |
String Methods
Math Methods
JOptionPane Methods
Review Questions and Exercises
Solutions
Chapter 2: Java Fundamentals | Table of Contents | Chapter 4: Control Structures |
---|
Template loop detected: