Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Java Articles
Found 4,495 articles
Explanation about SAP ABAP Stack and JAVA Stack and role of Java Stack during ECC upgrade
Note that all SAP ERP modules run on SAP ABAP stack. SAP NetWeaver Application Server (ABAP Stack) is part of the SAP NetWeaver portfolio and represents the ABAP-based technical basis for many SAP products. It delivers technical frameworks, tools, repositories, and much more. When to Install Java Stack If you are planning to use SAP PI module then you should install Java Stack. Whenever you need something like Adobe Interactive Forms or NetWeaver Portal functionality that requires the Java Stack, it becomes necessary. You can go for an upgrade ...
Read MoreHandling Exception and use of CX_ROOT directly and subclasses
It is not advisable to use CX_ROOT directly and you would require using one of its direct subclasses. The CX_ROOT is the root class for all exception classes in SAP ABAP, but working with its subclasses provides better control and handling mechanisms. Also, the propagation depends upon the exception subclass hierarchy. Exception Subclass Types There are three main types of exception subclasses, each with different propagation and handling behaviors − Subclasses ...
Read MoreUsing SAP JCO to connect SAP server to JAVA application
When connecting SAP server to JAVA applications using SAP JCO, it is recommended to use load balancing parameters instead of direct server connection parameters for better reliability and performance. Recommended Connection Parameters Instead of using JCO_AHOST and JCO_SYSNR for direct server connection, use the following load balancing parameters − JCO_R3NAME − Use this with the system ID of the target host JCO_MSHOST − Use this with the message server host name or IP address JCO_MSSERV − Use this with the message server port number ...
Read MoreWhat is constructor chaining in Java?
Constructors are similar to methods but, They do not have any return type. The name of the constructor is same as the name of the class. Every class has a constructor. If we do not explicitly write a constructor for a class, the Java compiler builds a default constructor for that class. Each time a new object is created, at least one constructor will be invoked. A class can have more than one constructor. this() and super() are used to call constructors explicitly. Where, using this() you can call the current class’s constructor and using super() you can ...
Read MoreHow to instantiate member inner class in Java?\\n
A class that is declared inside a class but outside a method is known as member inner class.We can instantiate a member Inner class in two waysInvoked within the classInvoked outside the classRules for Inner ClassThe outer class (the class containing the inner class) can instantiate as many numbers of inner class objects as it wishes, inside its code.If the inner class is public & the containing class as well, then code in some other unrelated class can as well create an instance of the inner class.No inner class objects are automatically instantiated with an outer class object.If the inner ...
Read MoreHow to find the age when date of birth is known? Using Java?
Java provides a class named Period in the java.time package. This is used to calculate the time period between two given dates as days, months and, years etc.The between() method of this class accepts two LocalDate objects and finds out the period between the two given dates (number of years, months, and days) and returns as a period object.From this, you can extract the number of days, months and, years of the period in between using the getDays(), getMonths() and, getYears() respectively.Finding the ageIf you already have the date of birth of a person, to find the age −Get the ...
Read MoreWhat is ‘this’ reference in Java?
The this is a keyword in Java which is used as a reference to the object of the current class, with in an instance method or a constructor. Using this you can refer the members of a class such as constructors, variables and methods.Using “this” you can −Differentiate the instance variables from local variables if they have same names, within a constructor or a method.class Student { int age; Student(int age) { this.age = age; } }Call one type of constructor (parametrized constructor or default) from other in a class. It is known as ...
Read MoreHow to Get a slice of a primitive array in Java?
You can get a part of a Java array in between two specified indexes in various ways.By Copying contents:One way to do so is to create an empty array and copy the contents of the original array from the start index to the endIndex.Exampleimport java.util.Arrays; public class SlicingAnArray { public static int[] sliceArray(int array[], int startIndex, int endIndex ){ int size = endIndex-startIndex; int part[] = new int[size]; //Copying the contents of the array for(int i=0; iarray[i]); part = stream.toArray(); //Copying the contents of the array for(int i=0; i
Read MoreTypes of quantifiers in Java regex
If you want to specify the number of occurrences while constructing a regular expression you can use quantifiers. Java supports three types of quantifiers namely: greedy quantifiers, reluctant quantifiers and possessive quantifiers.Greedy quantifiers − Greedy quantifiers are the default quantifiers. A greedy quantifier matches as much as possible from the input string (longest match possible) if match not occurred it leaves the last character and matches again.Exampleimport java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter input text: "); ...
Read MoreJava program to sort words of sentence in ascending order
To sort words of sentence in ascending order, the Java code is as follows −Exampleimport java.util.*; public class Demo{ static void sort_elements(String []my_str, int n){ for (int i=1 ;i= 0 && temp.length() < my_str[j].length()){ my_str[j+1] = my_str[j]; j--; } my_str[j+1] = temp; } } public static void main(String args[]){ String []my_arr = {"This", "is", "a", "sample"}; int len = my_arr.length; sort_elements(my_arr,len); System.out.print("The sorted array is : "); for (int i=0; i
Read More