What is call function and called function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is call function and called function

give one example program

19th Jun 2017, 6:29 AM
R Prathibha
R Prathibha - avatar
3 Answers
0
public class TooLazy { public static void main(String[] args) { PrintText("I'm too lazy for this."); } public static void PrintText(String text) { System.out.println(text); } }
19th Jun 2017, 6:41 AM
Jamie Isaksen
Jamie Isaksen - avatar
0
wy we have to use public static void printText(string text)
19th Jun 2017, 6:45 AM
R Prathibha
R Prathibha - avatar
0
The "public static void" is an access modifier, while printText() is simply just a method. Read more about access modifiers here: https://stackoverflow.com/a/33627846
19th Jun 2017, 6:50 AM
Jamie Isaksen
Jamie Isaksen - avatar