Karthikeya Boyini has Published 2383 Articles

How to read data from scanner to an array in java?

karthikeya Boyini

karthikeya Boyini

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

10K+ Views

The Scanner class of the java.util package gives you methods like nextInt(), nextByte(), nextFloat() etc. to read data from keyboard. To read an element of an array uses these methods in a for loop:Example Live Demoimport java.util.Arrays; import java.util.Scanner; public class ReadingWithScanner {    public static void main(String args[]) { ... Read More

How to sort a random number array in java?

karthikeya Boyini

karthikeya Boyini

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

2K+ Views

To sort an array in Java, you need to compare each element of the array to all the remaining elements and verify whether it is greater if so swap them.One solution to do so you need to use two loops (nested) where the inner loop starts with i+1 (where i ... Read More

Usage of subqueries in internal table as condition in SAP ABAP source code.

karthikeya Boyini

karthikeya Boyini

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

262 Views

Note that if you specify an OPTIONS parameter with parenthesis, it will show an error. When you use Where (itab)In this case, itab has only one field with type C and shouldn’t be longer than 72 characters. “Itab” must be specified in parenthesis without any space between parenthesis and table ... Read More

Advertisements