java basic coding practice code example

Example: java coding practice

package com.example.packagenames.are.reverse.domain.all.lowercase.seperated.by.dots;
//naming conventions
public class TypeNamesArePascalCase(){
	public static final String CONSTANTS_ARE_UPPER_CASE_WITH_UNDERSCORES="Hello World";
  	private int membersArePrivateAndCamelCase;
  	public int getMembersArePrivateAndCamelCase(){
      	//You can have public getters if you want
    	return membersArePrivateAndCamelCase;
    }
  	public void setMembersArePrivateAndCamelCase(int membersArePrivateAndCamelCase){
    	//You can have public setters if you want
      	this.membersArePrivateAndCamelCase=membersArePrivateAndCamelCase;
    }
  	public void methodsAreCamelCase(){
    	
    }
}

public enum EnumsAreTypes{
	ENUM_CONSTANTS,ARE,CONSTANTS
}

Tags:

Java Example