0% found this document useful (0 votes)
2 views1 page

Java Object Function Example Code

This Java program defines an ObjectFunction class with two methods, sampleMeth() and doMethod(). sampleMeth() prints a welcome message, blank line, and calls doMethod(). doMethod() prints a message. The main method creates an ObjectFunction object and calls sampleMeth() on it.

Uploaded by

riyazudheen
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Java Object Function Example Code

This Java program defines an ObjectFunction class with two methods, sampleMeth() and doMethod(). sampleMeth() prints a welcome message, blank line, and calls doMethod(). doMethod() prints a message. The main method creates an ObjectFunction object and calls sampleMeth() on it.

Uploaded by

riyazudheen
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ObjectFunction.

java

package ooconcepts;

public class ObjectFunction {

public void sampleMeth(){

[Link]("Hello Welcome to java... ");

[Link]("");

doMethod();

public void doMethod(){

[Link]("Im doing method....");

public static void main(String[] args) {

ObjectFunction of = new ObjectFunction();

[Link]("");

[Link]();

You might also like