Vikyath Ram has Published 151 Articles

Make a class final in Java

Vikyath Ram

Vikyath Ram

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

4K+ Views

A class can be made final by using the final keyword. The final class cannot be inherited and so the final keyword is commonly used with a class to prevent inheritance.A program that demonstrates a final class in Java is given as follows:Example Live Demofinal class A {    private int ... Read More

How to import all classes in Java?

Vikyath Ram

Vikyath Ram

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

10K+ Views

All the classes in a package can be imported using the import statement along with the character *. For example - All the classes in the package java.util can be imported using import java.util.*;A program that demonstrates this in Java is given as follows:Example Live Demoimport java.util.*; public class Demo { ... Read More

Static methods vs Instance methods in Java

Vikyath Ram

Vikyath Ram

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

2K+ Views

In Java as we know that the behavior of any variable/method is defined by the keyword that is used in front of its declaration name. So one of the non-access modifiers is Static which can be used along with method as well as with variable. Static methods as name states ... Read More

Swapping Characters of a String in Java

Vikyath Ram

Vikyath Ram

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

3K+ Views

For swapping characters of a string in Java we can use string builder which is mutable so we need not to take care of new object creation during swapping. In this we would create a method which swap characters of string based on location of swapping characters.This method will take ... Read More

Python program to generate all possible valid ID address from given string

Vikyath Ram

Vikyath Ram

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

627 Views

String is given. String contains only digit. Our task is to check all possible valid IP address combinations. Here first we check the length of the string then split by ".". Then we check the different combination of ".". Example Input : "255011123222" It's not a valid IP ... Read More

Should a constructor always have the same name as the class in java?

Vikyath Ram

Vikyath Ram

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

2K+ Views

Yes, the constructor should always have the same name as the class. Constructor looks like method but it is not. It does not have a return type and its name is same as the class name. Mostly it is used to instantiate the instance variables of a class. If the ... Read More

Differences between | and || operators in Java

Vikyath Ram

Vikyath Ram

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

3K+ Views

| is a bitwise operator and compares each operands bitwise.It is a binary OR Operator and copies a bit to the result it exists in either operands.Assume integer variable A holds 60 and variable B holds 13 then  (A | B) will give 61 which is 0011 1101.Whereas || is ... Read More

What does abstract modifier in Java do?

Vikyath Ram

Vikyath Ram

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

276 Views

An abstract keyword is used to declare methods abstract methods and abstract classes. Once a method is declared abstract we should not specify body for those. Example public abstract class Sample{ public abstract demo(){ } } Error Sample.java:2: error: invalid method ... Read More

Passing data from one report to another in ABAP using SUBMIT \\\

Vikyath Ram

Vikyath Ram

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

193 Views

There doesn't seem to be any error in your syntax. Please verify if you declared the variables correctly. In case they are defined correctly, try the extended syntax check to see the error. The extended check can be done by going to PROGRAM => Check => Extended Syntax Check.

Rfcabapexception error while querying a number of columns using RFC_READ_TABLE in SAP

Vikyath Ram

Vikyath Ram

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

185 Views

It is not because of a number of columns but the actual total size of the fields you are querying. It should not be more than 512 bytes.  For RFC communication, the types likes DATA or STANDARD table are not supported. So the RFC_READ_TABLE function module has to convert the ... Read More

Advertisements