Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Java >> Snippet

11 Classes


Simple example :
public class MyClass {
      //properties and methods go here
}

More general example :
public class MyClass {
    int Property1 ;
    int Property2 ;
    public void Method1 {
           //method statements go here
    }
    public void Method2 {
           //method statements go here
    }
{

To use the general example class , use this code.
Then you can set properties and use methods of new object :

MyClass NewVariable = new MyClass () ;
MyClass.Property1 = 12
MyClass.Proterty2 = 17