₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,113 members, 8,420,423 topics. Date: Thursday, 04 June 2026 at 07:11 PM

Toggle theme

Java Programming Language Methods And Object Need Explanation - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingJava Programming Language Methods And Object Need Explanation (1127 Views)

1 Reply (Go Down)

Java Programming Language Methods And Object Need Explanation by abdulsalamgande(op): 12:30am On Feb 10, 2018
Can someone help me with explanation on Methods and object in java programming?
Re: Java Programming Language Methods And Object Need Explanation by kingvicky(m): 11:18am On Feb 10, 2018
abdulsalamgande:
Can someone help me with explanation on Methods and object in java programming?
Methods are subprograms or functions that run a separate bit of code. In Java, methods are usually contained in classes and they can be called using the object of the class in which they are contained or directly in the main method if they are declared as 'static'.. As example - say we have a class named program...

public class Program {

//This is a method
public void printToConsole() {

System.out.println("Hello world"wink;

} //End the method

//This is the main method
public static void main(String[] args) {

//Now we create an object from which we can call
// the method
Program p=new Program();

// Call the method with the created object

p.printToConsole();

} //End main method
} //End class
Re: Java Programming Language Methods And Object Need Explanation by Desyner: 11:39am On Feb 10, 2018
kingvicky:
Methods are subprograms or functions that run a separate bit of code. In Java, methods are usually contained in classes and they can be called using the object of the class in which they are contained or directly in the main method if they are declared as 'static'.. As example - say we have a class named program...

public class Program {

//This is a method
public void printToConsole() {

System.out.println("Hello world"wink;

} //End the method

//This is the main method
public static void main(String[] args) {

//Now we create an object from which we can call
// the method
Program p=new Program();

// Call the method with the created object

p.printToConsole();

} //End main method
} //End class
Correct!
Re: Java Programming Language Methods And Object Need Explanation by talk2hb1(m): 12:25pm On Feb 10, 2018
abdulsalamgande:
Can someone help me with explanation on Methods and object in java programming?
What Part are you not understanding?
Re: Java Programming Language Methods And Object Need Explanation by kingvicky(m): 2:01pm On Feb 10, 2018
Desyner:
Correct!
Thank you bro!
1 Reply

What Are The Limitations Of Flutter Over Kotlin, Swift And Object CI Need Explanation On This Code?? Php ProgrammersPlease I Need Explanation Of This Express.js Code234

Request For Features For An Online Cbt Practice Website.Programmers Needed In Ilorin