Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,152,210 members, 7,815,226 topics. Date: Thursday, 02 May 2024 at 09:20 AM |
Nairaland Forum / Science/Technology / Programming / Java Programming Language Methods And Object Need Explanation (999 Views)
What Are The Limitations Of Flutter Over Kotlin, Swift And Object C / Please I Need Explanation Of This Express.js Code / Is It Advisable To Learn Java As My First Programming Language? (2) (3) (4)
Java Programming Language Methods And Object Need Explanation by abdulsalamgande(m): 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: 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" } //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:Correct! 1 Like |
Re: Java Programming Language Methods And Object Need Explanation by talk2hb1(m): 12:25pm On Feb 10, 2018 |
abdulsalamgande: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:Thank you bro! |
(1) (Reply)
What Is The Solution? / Do You Want To Learn How To Code Today / Help With Calling An API
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11 |