Difference between revisions of "Calling Methods"

From CompSciWiki
Jump to: navigation, search
Line 1: Line 1:
 
{{1010Chapter|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".
 
{{1010Chapter|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".
  
You can write your own methods as well, although this will be discussed later. For a full list of all the predefined methods, visit [http://java.sun.com/javase/6/docs/api/ The Java API]. This section demonstrates some predefined methods that are useful.|Overview=This section will show you some useful String, Math, and JOptionPane (graphical input/output) methods.}}
+
You can write your own methods as well, although this will be discussed later. For a full list of all the predefined methods, visit [http://java.sun.com/javase/6/docs/api/ The Java API]. This section demonstrates some predefined methods that are useful.}}
  
 
=[[String Methods|String Methods]]=
 
=[[String Methods|String Methods]]=

Revision as of 18:19, 21 March 2007


Wiki 1010 Table of Contents

Chapter #

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".

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





Table of Contents


String Methods

Math Methods

JOptionPane Methods

Review Questions and Exercises