Sunteți pe pagina 1din 9

1

OOPS INTERVIEW QUESTIONS AND ANSWERS


1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
11)
12)
13)
14)
15)
16)
17)
18)
19)
20)
21)
22)
23)
24)
25)
26)
27)
28)
29)
30)
31)
32)
33)
34)
35)
36)
37)
38)
39)
40)
41)
42)
43)
44)
45)
46)
47)
48)

What is a class?how do u create


What is an object? how do u create
What do u mean by attributes and methods?Any real time ex?
What is the diff b/w instance and static comp?how do u access them? Explain?
What is diff b/w private,public,protected?
In how many ways we can create a class?
How does u create a method?
Can we define user defined types in classes?
What is a table type and what is its use??
What is an event?
What is an event handler method?explain syntax?
What is set handler? please explain syntax?
How does u raise an event?
Explain the concept of events?any real time ex?
What is a constructor and types?
Why do we use construcors? Ay real time ex?
What is the diff b/w instance and static construcor?
Can we define importing and exp parameters for constructors?
Which constructor I s executed first?
What is an Inteface?any real time ex?
What is polymorphism?
How do we use interfaces in classes?
What are aliases?
What is inheritance?explain syntax?
What is super?
What is redifination?
Do we have multiple inheritance and mulit level inheritance?
What is an abstract class?
Can we create an object to abstract class? If no,then how?
What is FINAL?
Can we access private variables of super class? If yes how??
Did you work on OOPS ALV? If yes explain?
What are the advantages of OO ALVS?
What are the classes in OO ALVS?
What are the methods?
What is custom container?
What is a fieldcatelog?
Did u work on interactive ALV? I f yes explain the procedure?
Also explain the procedure of interactive ALV using FMS?
Can we display 2 grids on a single screen, If yes how?
How did u display logo/top of page in OOALV and normal ALV?
Explain about Object oriented programming?
Object oriented Concepts?
What is a class?
What is an object?
How many types of classes are there in OOAbap?
What is the difference between function group and classes?
What are the differences local & global classes?
1

49)
50)

What are the Components of a class?


How to define a class locally?

1)
What is a constructor & types of constructors?
2)
Difference between static and instance constructors?
3)
How to a create object for the class?
4)
how to call a method?
5)
What is static attribute & method?
6)
Can we instantiate a class within implementation of other class
7)
Can we put non declarative statement e.g. START-OF-SELECTION within a class?
8)
How to create a global class?
9)
How can we pass importing parameter?
10)
Can we pass returning parameter by reference?
11)
Can a method call itself?
12)
What is me variable?
13)
Can we have export parameter in Instance constructor?
14)
What is an abstract class?
15)
What is final class & Method?
16)
What is an interface?
17)
Can we implement interface in private section of any class?
18)
What is alias?
19)
What is a friend class?
20)
How to create an object for private class?
21)
What is a Single-ton class?
22)
What is a Persistent class?
23)
What is inheritance?
24)
What are the visibility sections visible to subclass of superclass?
25)
Can we declare same name for components of subclass as components of super
class?
26)
What is single inheritance?
27)
Does OOABAP supports multiple inheritance?
28)
What is the root node of all inheritance trees?
29)
How can we re-implement super class method in subclass?
30)
Can we change the parameter interface of the redefined methods?
31)
How to call original method from redefined method?
32)
What is an abstract class?
33)
Can abstract methods be redefined?
34)
Can final class methods be redefined in the subclass?
35)
Can static method be redefined?
36)
Can we change the visibility of the redefined method?
37)
Can the private and protected classes can be inherited?
38)
Does the instantiation of Subclass depend on the super class?
39)
Can the constructor be redefined?
40)
Does the parameter interface of the instance constructor be changed in the subclass?
41)
Do we need to call the super class instance constructor in the subclass when instance
constructor is redefined?
42)
In which order the constructors execute in inheritance tree?
43)
Can we call the instance constructor of the super class in sub class?
44)
Can we call the static constructor of the super class in sub class?
45)
What is polymorphism?
2

46)
What is Narrowing cast(Upcast)? Explain briefly?
47)
What is the use of Narrowing cast?
48)
Which components of sub class can be accessed from super class reference
using narrowing cast?
49)
What is Widening cast ( Down casting)?
50)
What is the use of Widening cast?
1)
What is an Interface?
2)
Can we instantiate the interface?
3)
Can we achieve multiple inheritance using Interfaces?
4)
Can we assign values to attributes of interface inside interface?
5)
Does polymorphism achieved through interfaces?
6)
Where can an interface be implemented in the class?
7)
Is it mandatory to implement all methods of interface in the class which includes
interface?
8)
What is the difference between abstract class and interface?
9)
What is alias?
10)
Can we make methods of interface as abstract and final?
11)
Can we do upcast and downcast using interface references?
12)
Can we declare events in interface?
13)
Can we raise events in interface?
14)
Can abstract class can only be accessed using its static components or its
subclasses.?
15)
What is a single-ton class?
16)
What are the differences between Abstract Class and Interface?
17)
What is the purpose of the Read-only addition on the data statement in a class
definition?
18)
What is the difference in attributes defined in the public versus private section of a
class?
19)
What is the keyword used to define static attributes?
20)
What is the difference in an instance method and a static method?
21)
What statement is used to instantiate an object?
22)
what is the purpose of garbage collector?
23)
When is the constructor method is executed?
24)
Is multiple inheritance is possible in ABAP objects?
25)
Static methods can be redefined ?
26)
A constructor method can be redefined ?
27)
What is a redefined method?
28)
What is a SUPER reference?
29)
What is class?
30)
What is object?
31)
Can we instantiate a class within implementation of other class?
32)
What is deferred key word ?
33)
Can static method use instance attribute ?
34)
Can a method call itself?
35)
What is preferred parameter ?
36)
can we pass returing parameter by reference ?
37)
What is ME variable?
38)
What are type of constructor and explain them?
39)
Can we have export parameter in Instance constructor?
3

40)
41)
42)
43)
44)
45)
46)
47)
48)
49)
50)
51)
52)
53)

Can instance constructor raise exception ?


Can we have static methods in interface?
What is interface ?
Is it mandatory to implement all the methods of interface ?
What is alias ?
What is Friendship?
Can we have more than one event handler method for same event ?
Can event have import parameter ?
Can we call static constructor more than once in a program?
How can we pass importing parameter ?
Can we implement interface in private section of any class ?
which of the following are correct ?
Static attributes are visible in all classes in the inheritance tree?
Can we put non declarative statement e.g. START-OF-SELECTION within a class?
SAP OOP's Interview Questions

1. Difference between Local Class and Global Class ?


2. What are the Advantages of OOABAP in SAP Development environment ?
3. Difference between OOABAP and other Programming Languages ?
4. What is the Transaction code for Global and Global Interfaces ?
5. Difference between Implicit Objects and Explicit Objects ?
6. What are the Examples of Implicit objects ?
7. What is Final Class ?
8. What is Final Method ?
9. What is the use of Creating Final Class ?
10.

What is the use of Creating Final Method ?

11.

What is Friend Class ? When we use Friend Class ?

12.

How to Stop/Restrict Inheritance in OOABAP ?

13.

How to Stop/Restrict Polymorphism in OOABAP ?

14.

What is Inheritance ?

15.

What are the types of Inheritance ?

16.

What is single Inheritance and Multi-Level Inheritance in OOABAP ?

17.

Can we have Multiple Inheritance in OOABAP ?


4

18.

Can we have Multiple Super Classes for one SubClass in OOABAP ?

19.

What is Inheritance Hierarchy ?

20.

Difference between Abstract Class and Interface ?

21.

What is the similarity between Abstract class and Interface ?

22.

What is the use of Abstract Class ?

23.

What is the use of an Interface ?

24.

What is the purpose of creating Aliases ?

25.

What is Abstract method ? When we create Abtract Method ?

26.

What should be the visibility of Abstract Methods in Abstract class ?

27.

What should be the visibility of methods in an Interface ?

28.

What is the use of Constructor ?

29.

What are the types of Constructors ?

30.

Difference between Static Constructor and Instance Constructor ?

31.

What is the purpose of Destructor ?

32.

What is the Use of "REDEFINITION" keyword ?

33.

What is the use of "SUPER" keyword ?

34.

In Which situation we use "REDEFINITION" keyword ?

35.

In Which situation we use "SUPER" keyword ?

36.

Can we make Sub class as Super Class or not ?

37.

What is the Difference between "Method" and "Constructor" ?

38.

What are the various parameters we use for Method in OOABAP ?

39.

Can we create method to have multiple return type Parameters ? How ?

40.

Can we restrict a method to have only single return type parameter ? How ?

41.

In how many ways we can call "Instance method" in OOABAP ?

42.

In how many ways we can call "static method" in OOABAP ?


5

43.

Can we access instance attributes from Static constructor ?

44.

What is Type Casting ?

45.

How many types of TYpe Casting Exists in OOABAP ?

46.

Difference between Narrow Casting And Wide Casting in OOABAP ?

47.

Difference between UPCasting and Downcasting in OOABAP ?

48.

Can we Implement Multiple Interfaces in single Class ?

49.

How to achieve Multiple Inheritance in OOABAP ?

50.

What is Polymorphism ?

51.

What are the Various techniques used to Achieve Polymorphism ?

52.

What is Method Overloading and Method Overriding ?

53.

Can we use Method Overloading in OOAABAP ?

54.

How to Achieve Polymorhism in OOABAP ?

55.

What is the difference between CLASS , OBJECT and INTERFACE ?

56.

Can we create an Object for Abstract Class ? If No, Why ?

57.

Can we create an Object for Interface ? If No, Why ?

58.

What are Concrete methods in OOABAP ?

59.

What are Non-Concrete methods in OOABAP ?

60.

For What type of Classes we create an Object in OOABAP ?

61.

Can we create an Object for Final Class ?

62.

Can we Override the Final Method in OOABAP ?

63.

What are Exceptions ?

64.

How to Handle Exceptions in OOABAP ?

65.

Difference between Design Time errors and Runtime Errors in OOABAP ?

66.

What is the use of TRY-CATCH Blocks in OOABAP ?

67.

Can we have Multiple Catch Blocks in OOABAP ?


6

68.

Can we define Abstract Methods in Private section? If No, Why ?

69.

Can we define Interface Methods in Private section or Protected section? If No,


Why?

70.

Difference between "Returning Parameter" and "Exporting Parameter" ?

71.

How to call method if method contains Importing parameters and Exporting


parameters" ?

72.

How to call method if method contains Importing parameters and Returning


parameters" ?

73.

In which situation we use "Receiving Parameter" in method call ?

74.

Can we have Exporting Parameters in Constructor definition ?

75.

Can we have Importing Parameters in Constructor definition ?

76.

What are CLASS Attributes or CLASS Variables? Static attributes are also called as
Class variables?

77.

What are CLASS Methods ? Static Methods are also called as CLASS Methods ?

78.

What is singleton Class ?

79.

Can we access Protected section Methods of Se24 class in WebDynpro ABAP ?

80.

What are the various components of a Class ?

81.

Can we Design ABAP Interactive Reports using OOABAP ? How ?

82.

Can we access Static methods of class without creating Object or not ? If Yes , How ?

83.

Can Contructor return values ?

84.

What are the main features of OOABAP ?

85.

What is the Use Of "ME" keyword ? It's a Self Reference.What is the use of ?= ( Type
cast operator ) in OOABAP ?

86.

Can we Inherit Final class in Sub class or not ?

87.

Can we Call Constructor explictly?

88.
89.

What is the difference between "Public section" , "Protected Section" & "Private
Section"?
Difference between procedural oriented and object oriented approach.
7

90.

Advantages and use of Object oriented concept related to ABAP.

91.

Different features of OO ABAP.

92.

Analysis of OO ABAP related to development work.

93.

Brief description about Class and objects.

94.

Description about types of class.

95.

Idea about attribute visibility mode and access specifier.

96.

Idea for class visibility.

97.

Brief description for reference data object .

98.

Details about interface, abstract class, final class, friend class , deferred class, load
class.

99.

A brief idea about local and global (class , interface ).

100.

Idea for object and interface reference.

101.

Different method calling procedure(static,dynamic) in OO ABAP.

102.

Idea about constructor in OO ABAP.

103.

A brief description about Events and their use in a class.

104.

Use of super keyword.

105.

Concept of overriding.

106.

Concept for static and non-static related to (attributes , events, constructor).

107.

Description about ME refrence.

108.

Idea about parameters type related to ( methods , constructor , events ).

109.

Details of inheritance mechanisim in OO ABAP.

110.
A brief Concept of narrow and widening casting related to OO ABAP with suitable
real time examples.
111.
The handling mechnisim for class(friend,final,abstract), interface,
constructor, methods ,inheritance ,data objects related to SE24 TCODE.
112.

Mechanisim for exceptional handling concept related to OO ABAP.

113.

Class hierarchy details for exceptional handling.

events,

114.

A brief idea about RTTS , RTTI , RTTC mechanisim related to OO ABAP.

115.

Brief idea about transient data object and persistence data object.

116.

A brief description about Test class and Persistence class.

117.
A brief description about Pseudo-code comment( Risk level and Duration)and
handling mechanisim.
118.

Mechanisim of unit testing for methods using test class.

119.

Creation mechanisim for test class and persistence class.

Description about different mechanisim(Business key,GUID) to create a persistence


class .

120.

S-ar putea să vă placă și