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 | 5 No |
Post New Answer View All Answers
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
What is the main purpose of inheritance law?
What is abstraction in oop with example?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
What are constructors in oop?
What is overriding vs overloading?
What is abstraction oop?
Can we define a class within the interface?
explain sub-type and sub class? atleast u have differ it into 4 points?
what are the different types of qualifier in java?
Explain the concepts involved in Object Oriented programming.
What is the real life example of polymorphism?
What do you mean by Encapsulation?
What is object in oop?
write knight tour problem which is present in datastructure