Tags: appficial java java void method void method void void vs return method return methods java methods methods java functions functions void vs non void non void methods return values method return return statement Math.pow hello world java programming java tutorial java examples java example java class learn java java program how to program java code programming coding java api jre jdk jvm java 8
More videos coming soon, please SUBSCRIBE!
A void method simply performs a task and terminates
For example: System.out.println(“Hello world”);
A value-returning method performs a task and then also returns (or sends) a value back to the code where it was called
For Example: int answer = Math.pow(2,3);
Please SUBSCRIBE to Appficial, and check out more Java Programming Tutorials! http://www.appficial.com
Java Methods Intro
https://youtu.be/m2CZ8ZcW7Rg
Java Method Modifiers
https://youtu.be/h_UBnO7qJgc
Java Void Methods VS. Value Returning Methods
https://youtu.be/gGIr9kvg6V4
or
Question
3>thank you so much
Just did my 6 months boot camp, and didn't really know about the difference between void and return method, you just made everything crystal clear in 3min! you are a freakin legend!
oh my god I finally get i can't believe it i love you!!!!
If both method execute void and return type then it may show error.Void type not allowed can you ans for this type of error?
Is one better than the other? When and why would we use one or the other?
1:31 how'd you made the comment out shortcut by selecting the text then // it?
i have been searching for this like for months still without getting it..but with this video every thing is clear now..thanks man.
Just a quick question. What type of method would I need to create if I wanted to do a task and return a given value back to the main method? Rather than passing values from the main to another class and returning something different back. I’m new to programming so sorry if what I said doesn’t make sense. I just don’t understand when to use “public static, static void, public static void” or how each of them are different from each other
what would happen if u just changed the void into int without changing anithing else like making a new function with return value?
Technical subjects need to be explained with minimum " wording ". Clean and simple so that the brain can sponge the essence of the information without rubbish. You have executed this principle beautifully. It is also good to see two similar things side-by-side. I learn much faster this way. Thank you for this.