Void () | SoloLearn: Learn to code for FREE!


Void ()

what I write now here

6/7/2017 6:00:27 AM

MD. Rehan Mahmud

2 Answers

New Answer


void beSpecific() { System.out.println("you need to be more specific"); }


hi, void is a class in java but u can't initialize the class like void v=new void()//wrong. It represents the return type of function or methods which will return nothing to the calling function class sample { void display(int a,int b) { c=a+b; System.out.println("sum"+c); } public static void main(String ar[]) { sample s=new sample(); s.display(10,20); } } which will display sum of two numbers and it return nothing to the calling function.