Java CSV to Array and Array to CSV

This is a little example in Java to convert a CSV String into an Multidimensional Array, after that i convert the Array back into a CSV String, you could choose the delimiter by yourself. In this case i take the “-” to see the different:

This is the Output, fist block separated with the “;” is the input and with “-” is the output:

Java try/catch

This is a little example about try and catch in Java:

Output looks like:

Java calculate the sum of the given numbers

This program calculates the sum from 10 numbers, you could hit “stop” to break and calculate less than 10 numbers:

Output looks like this:

Java input output example

This is a little example in Java how to print an info text and then read a number from the terminal, calculate the square and then print the result:

To compile your test.java file run this in your terminal:

now we have the file test, to execute run this:

This is the output:

The same Program in C# is here : C# input output example