## Amazon Interview Question

Software Developers**Country:**United States

**Interview Type:**Phone Interview

class Sum{

int ab,bc,ca;

public Sum()

{

ab=0;bc=0;ca=0;

}

Sum(int a, int b){

ab=a;

bc=b;

}

Sum(int a, int b, int c){

ab=a;

bc=b;

ca=c;

}

void add(){

System.out.println("Sum: "+(ab+bc+ca));

}

public static void main(String args[]){

Sum obj1=new Sum(5,4);

Sum obj2=new Sum(4,4);

Sum obj3=new Sum(4,5,6);

obj1.add();

obj3.add();

obj2.add();

}

}

class Sum{

int ab,bc,ca;

public Sum()

{

ab=0;bc=0;ca=0;

}

Sum(int a, int b){

ab=a;

bc=b;

}

Sum(int a, int b, int c){

ab=a;

bc=b;

ca=c;

}

void add(){

System.out.println("Sum: "+(ab+bc+ca));

}

public static void main(String args[]){

Sum obj1=new Sum(5,4);

Sum obj2=new Sum(4,4);

Sum obj3=new Sum(4,5,6);

obj1.add();

obj3.add();

obj2.add();

}

}

asdf

- James666 June 23, 2018