Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 3 pages
Class notes

Java coding

Document preview thumbnail
Preview 1 out of 3 pages

Easy notes for basic java coding

Content preview

TOPIC 3 : JAVA LANGUAGE
modifier 3.5 METHOD
(METHOD DEFINITION and METHOD CALL for type 1 and Type 2)



Method Definition Method Calls

General Format of Method Definition General Format of Method Calls
public static / static returnType methodName classname. methodName (arguments);
(parameters) { OR
// method body methodName (arguments);
}
Type 1 : A method definition which return Type 1 :
no value, receive no parameters receive no value, pass no arguments
public static void showWelcome( ) {
System.out.print (“Welcome to Java”); showWelcome ( ) ;
}
Type 2 : A method definition which Type 2 : receive no value, pass
return no value, receive parameters arguments
static void sayHello(String name) {
System.out.print (“Hello” + name); sayHello (name) ;
}

Document information

School year
3
Uploaded on
August 23, 2025
Number of pages
3
Written in
2024/2025
Type
Class notes
Professor(s)
-
Contains
All classes
$3.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
4
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions