Lakshmi Srinivas has Published 287 Articles

What does the bitwise right shift operator do in Java?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 30-Jul-2019 22:30:21

370 Views

The left operand value is moved right by the number of bits specified by the right operand.Example: A >> 2 = 15 means 1111.

What is the type of string literals in C and C++?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 30-Jul-2019 22:30:21

822 Views

In C the type of a string literal is a char[]. In C++, an ordinary string literal has type 'array of n const char'. For example, The type of the string literal "Hello" is "array of 6 const char". It can, however, be converted to a const char* by array-to-pointer ... Read More

Can constructors be marked final, abstract or static in Java?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 30-Jul-2019 22:30:20

2K+ Views

Except public, protected and, private constructor does not allow any other modifier. When you use a final keyword with a method or constructor it cannot be overridden. But, a constructor in Java cannot be overridden therefore, there is no need of using the final keyword with the constructor. Since ... Read More

What is the difference between super and this, keywords in Java?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 30-Jul-2019 22:30:20

663 Views

The this is a keyword in Java which is used as a reference to the object of the current class. Using it you can − Differentiate the instance variables from local variables if they have same names, within a constructor or a method. Call one type of constructor (parametrized ... Read More

What is a composition in Java?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 30-Jul-2019 22:30:20

346 Views

The composition is also a type of aggregation where the relationship is restrictive i.e. If two objects are in composition, the composed object will not exist without the other.

What is binding in Java?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 30-Jul-2019 22:30:20

6K+ Views

Association of method call with the method body is known as binding in Java. There are two kinds of binding. Static binding In static binding the method call is bonded with the method body at compile time. This is also known as early binding. This is done using static, private ... Read More

What is Externalizable in Java?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 30-Jul-2019 22:30:20

219 Views

Externalization is used whenever we need to customize serialization mechanism. If a class implements an Externalizable interface then, object serialization will be done using writeExternal() method.Whereas at receiver’s end when an Externalizable object is a reconstructed instance will be created using no argument constructor and then the readExternal() method is ... Read More

What is the purpose of System class in Java?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 30-Jul-2019 22:30:20

2K+ Views

System class belongs to the package java.lang. It cannot be instantiated. A System class provides − standard output. error output streams. standard input and access to externally defined properties and environment variables. A utility method for quickly copying a portion of an array. a means of loading files and ... Read More

What is default, defender or extension method of Java 8?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 30-Jul-2019 22:30:20

156 Views

Java 8 introduces a new concept of default method implementation in interfaces. This capability is added for backward compatibility so that old interfaces can be used to leverage the lambda expression capability of Java 8. For example, ‘List’ or ‘Collection’ interfaces do not have ‘foreach’ method declaration. Thus, adding such ... Read More

Double click on ALV Grid to call Transaction and pass information in SAP

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 30-Jul-2019 22:30:20

1K+ Views

You can make use of field - “wa_selrow” to define which column was clicked. Also, change the grid from row selection mode to cell selection mode.wa_selrow contains which field it is calling the transaction regardless or the field you clicked on so based on the content of wa_selrow, you can ... Read More

Advertisements