Confederate 3320 Confederate 3320 - 3 years ago 240
Java Question

Difference Between Classes And Methods in JAVA

I am learning how to code with Java. What is the difference between a class and a method, and which is which in the following code?

package template;
public class Template {
* @param args the command line arguments
private static class BGCode {
public BGCode() {

Answer Source

The second question is easy to answer: the things called class are classes. (i.e. class Template and class BGCode) There are no actual methods, only a constructor (-> public BGCode) which is similar to a method but not the same. I don't want to confuse you too much, so here is an article about this topic.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download