Java Language Provide Four Different Types of Cases to write the name.

When you will write code then you should focus on the naming convention, it provides the ways to provide the name of Variable, Constant, package, Methods, Class, and Interface.

1 lower case:-  for a keyword, for variable, single word method, package-name
example
class, static, void, main these all are a keyword in java, it's have been defined in lower case.
2 Proper Case or initial or Capitalize:-
Classname, Interfacename
3 Camel Case:-
the first word all char in lower case and the second word first char will be in caps and the same pattern will apply to all words.
The method name which contains more than one word will be in Camel case in java.
toString()
indexOf()
lastIndexOf()
4 Upper case:-
Constant in Java should be declared in Upper Case.
ASSIGNMENT OF JAVA Program:-
1 WAP to create a Salary Calculator of an employee using basic, ta, da, comm, pf, number of leave.
   calculate net salary and gross salary
basic:-20000
ta:-  2000
da:- 2500
comm:-  30000
pf:-  2000  (1000 emp and 1000comp)
leave:-
2)  WAP to calculate the multiplication of Complex numbers?
The solution of this program:-
import java.util.Scanner;
class Complex
{
public static void main(String args[])
{
Scanner sc= new Scanner(System.in);
System.out.println("Enter first complex number");
String comp1 = sc.next();  //2+3i
System.out.println("Enter second complex number");
String comp2 = sc.next();  //4+5i
int plusindex = comp1.indexOf("+");   //1
int iotaindex = comp1.indexOf("i");    //3
int r1 =Integer.parseInt(comp1.substring(0,plusindex)); //2
int i1 = Integer.parseInt(comp1.substring(plusindex,iotaindex)); //3
int plusindex1 = comp2.indexOf("+");  //1
int iotaindex1 = comp2.indexOf("i");  //3
int r2 =Integer.parseInt(comp2.substring(0,plusindex1)); //4
int i2 = Integer.parseInt(comp2.substring(plusindex1,iotaindex1)); //5
int r = r1*r2-i1*i2;
int i = r1*i2+r2*i1;
System.out.println(comp1 + "\n" + comp2);
System.out.println(r + "+" + i + "i");
}
}
3)  WAP to calculate the area of a triangle using heron's formula in java?
4)  WAP to calculate age where the son is 20 years younger than the father and 18 years younger than the mother what will be the age of the son, father, and mother, calculation start year will be entered by the user?