Sharon Christine

Sharon Christine

337 Articles Published

Articles by Sharon Christine

Page 9 of 34

Using table parameter in SAP RFC Function module

Sharon Christine
Sharon Christine
Updated on 13-Mar-2026 2K+ Views

When working with RFC enabled function modules in SAP, you should use a structure as line type for the table parameter. This approach ensures proper data handling and type safety when transferring tabular data between systems. Creating the Dictionary Structure First, you should declare a dictionary structure Z_MY_PARTS_DATA with a single field DESCRIPTION TYPE CGPL_TEXT2. This structure defines the layout of each row in your table parameter. TYPES: BEGIN OF z_my_parts_data, description TYPE cgpl_text2, ...

Read More

What is the difference between System.out.println() and System.out.print() in Java?

Sharon Christine
Sharon Christine
Updated on 11-Mar-2026 2K+ Views

The println() terminates the current line by writing the line separator string. The print() method just prints the given content.Examplepublic class Sample {    public static void main(String args[]) {       System.out.println("Hello");       System.out.println("how are you");       System.out.print("Hello");       System.out.print("how are you");    } }OutputHello how are you Hellohow are you

Read More

How to move an element of an array to a specific position (swap)?

Sharon Christine
Sharon Christine
Updated on 11-Mar-2026 3K+ Views

To move an element from one position to other (swap) you need to –Create a temp variable and assign the value of the original position to it.Now, assign the value in the new position to original position.Finally, assign the value in the temp to the new position.Exampleimport java.util.Arrays; public class ChangingPositions {    public static void main(String args[]) {       int originalPosition = 1;       int newPosition = 1;       int [] myArray = {23, 93, 56, 92, 39};       int temp = myArray[originalPosition];             myArray[originalPosition] = myArray[newPosition];       myArray[newPosition] = temp;       System.out.println(Arrays.toString(myArray));    } }Output[23, 39, 56, 92, 93]

Read More

How to convert a Double array to a String array in java?

Sharon Christine
Sharon Christine
Updated on 11-Mar-2026 4K+ Views

You can convert a double array to a string using the toString() method. To convert a double array to a string array, convert each element of it to string and populate the String array with them.Exampleimport java.util.Arrays; public class DoubleArrayToString {    public static void main(String args[]) {       Double[] arr = {12.4, 35.2, 25.6, 98.7, 56.4};       int size = arr.length;       String[] str = new String[size];           for(int i=0; i

Read More

Left pad a string in Java

Sharon Christine
Sharon Christine
Updated on 11-Mar-2026 962 Views

To left pad a string, use the String.format and set the spaces.String.format("|%20s|", "demotext")If you add 30 above, it will display the first string after 30 spaces from the beginning.String.format("|%30s|", "demotext")Examplepublic class Demo {    public static void main(String []args) {       System.out.print(String.format("|%20s|", "demotext"));       System.out.println("Left padded!");    } }Output| demotext|Left padded

Read More

Usage of Bootstrap panel-default

Sharon Christine
Sharon Christine
Updated on 11-Mar-2026 252 Views

For a basic panel, add class .panel to the element. With that, add class .panel-default to this element.You can try to run the following code to implement a panel-default classExample           Bootstrap Example                                                       This is demo text in a panel.                    

Read More

What are unchecked exceptions in Java?

Sharon Christine
Sharon Christine
Updated on 11-Mar-2026 3K+ Views

An unchecked exception is the one which occurs at the time of execution. These are also called as Runtime Exceptions. These include programming bugs, such as logic errors or improper use of an API. Runtime exceptions are ignored at the time of compilation. If you have declared an array of size 5 in your program, and trying to call the 6th element of the array then an ArrayIndexOutOfBoundsExceptionexception occurs.Examplepublic class Unchecked_Demo {    public static void main(String args[]) {       int num[] = {1, 2, 3, 4};       System.out.println(num[5]);    } }OutputException in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5    at Exceptions.Unchecked_Demo.main(Unchecked_Demo.java:8)

Read More

How to pull distinct values from an array in java?

Sharon Christine
Sharon Christine
Updated on 11-Mar-2026 1K+ Views

To pull distinct values in an array you need to compare each element of the array to all the remaining elements, in case of a match you got your duplicate element. One solution to do so you need to use two loops (nested) where the inner loop starts with i+1 (where i is the variable of outer loop) to avoid repetitions in comparison.Exampleimport java.util.Arrays; import java.util.Scanner; public class DetectDuplcate {    public static void main(String args[]) {       Scanner sc = new Scanner(System.in);       System.out.println("Enter the size of the array that is to be created::"); ...

Read More

How To Install Apache Maven on Ubuntu

Sharon Christine
Sharon Christine
Updated on 01-Mar-2024 347 Views

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information. This article explains about how to install apache maven on Ubuntu.To install apache maven, it should require pre-installed java on Ubuntu. To verify java version, use the following command –$ java -versionThe sample output should be like this –openjdk version "1.8.0_111" OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14) OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)If you wants to install java on Ubuntu, read this articleTo install ...

Read More

How to Configure Nginx as Reverse Proxy for WebSocket

Sharon Christine
Sharon Christine
Updated on 02-Nov-2023 44K+ Views

The WebSocket is a protocol which provides a way of creating web applications that supports real-time bi-directional communication between both clients and servers. WebSocket makes it much easier to develop these types of applications. Most modern browsers support WebSocket including Firefox, Internet Explorer, Chrome, Safari, and Opera, and more and more server application frameworks are now supporting WebSocket as well.For a production environment, where multiple WebSocket servers are needed for getting a good performance and high availability of the website or application, a load balancing layer which understands the WebSocket protocol is required, NGINX supports the use of WebSocket from ...

Read More
Showing 81–90 of 337 articles
« Prev 1 7 8 9 10 11 34 Next »
Advertisements