C#.net Interview Question

A=10
B=5
C=A+B
Print C

The above will be given in a multiline textbox. You need to
parse the above input, store values for A,B&c. And you have
to display the value of C.

Answer Posted / murthyknm

public class Sum
{
public static void main(String aaa[])
{
int A=10,B=5,C=0;
C=A+B;
System.out.println(" "+C);
}
}

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by overloading?

772


Whats is abstraction in oops?

804


What is the renewal class?

2392


What is overloading in oop?

738


write a program to find 2 power of a 5digit number with out using big int and exponent ?

2101






What are classes oop?

775


Why is oop better than procedural?

785


What is polymorphism used for?

751


What is difference between pop and oop?

782


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

2185


Why do we use oops?

742


What is purpose of inheritance?

828


Why is static class not inherited?

800


write string class as your own class in java without using any built-in function

2181


What is the example of polymorphism?

724