Category Archives: High Level Languages

C# for Loop: Explained with 4 Examples

The for loop is one of the available loops in C sharp programming language. The for loop is used to execute a given block of code repeatedly to the given number of times.

C# while and do while Loops With 3 Examples

The C# while loop is one of the available loops in the C Sharp like in other programming languages. The while loop executes the given statement or block of code repeatedly until the given condition is true.

3 Examples to Learn C# Switch Case in 15 Minutes

The switch statement is a decision-making statement which is used to execute a block of code when you have various blocks in C# program. The C# switch is useful when you have long blocks of if, if..else statement, otherwise.

C if else

C# if .. else and else if Statements: Explained with 3 Demos

The if is a decision-making statement in C# programming which is used to execute a block of code if a given condition evaluates as true.

In other words, if you have more…

2 examples for formatting dates by Java SimpleDateFormat class

The simple Date class of java.util package does not provide enough methods to work with the date formatting in Java applications. The Date() class is good to use if you intend to work with the current date.

Java equals method to compare strings

The equals method of the String class is used to compare two strings whether two are the same or not.

Java Hello world: Your first program

Until now, we learned what is the Java programming. After setting up the environment (JDK) to execute the Java code, it is time to write our first program of Java i.e. the “hello world” program.

How to declare and use the Java Boolean data type

Java has eight primitive data types to store data in its programs. The boolean Java is one of the primitive data types.

2 demos of converting Java int to double and double to int

You may convert the variable of data type double to int and int to double quite easily in Java programming. The example below shows how to convert that.

Java toString method

The Java toString is a String class method. This method returns an object’s string representation.