Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Java Java

Bounded types with generics in Java

Bounded Type Parameters There may be times when you want to restrict the types that can be used as type arguments in a parameterized type. For example, a method that ...
Java School Programming java-basics

Loops in Java

Looping in programming languages is a feature which facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true. Ja...
Java Loops & Control Structure Java

For Loop in Java Important points

Prerequisite: Loops in Java The structure of basic for loop: for(initialization; boolean expression; update statement) { //Body } Let’s look at some basic ...
Java School Programming Strings

String in Switch Case in Java

Switch Statement in Java Beginning with JDK 7, we can use a string literal/constant to control a switch statement, which is not possible in C/C++. Using a string-base...
Java Java

Widening Primitive Conversion in Java

Here is a small code snippet given. Try to Guess the output public class Test {     public static void main(String[] args)  &#xA0...
Java Java

Does Java support goto?

Java does not support goto, it is reserved as a keyword just in case they wanted to add it to a later version. Unlike C/C++, Java does not have goto statement, but j...
Java School Programming java-basics

Switch Statement in Java

The switch statement is a multi-way branch statement. It provides an easy way to dispatch execution to different parts of code based on the value of the expression. B...
Java School Programming java-basics

Comments in Java

In a program, comments take part in making the program become more human readable by placing the detail of code involved and proper use of comments makes maintenance...
Java Java

Do we need forward declarations in Java?

Predict output of the following Java program. // filename: Test2.java      // main() function of this class uses Test1 which is declared...
Java Java

Type conversion in Java with Examples

When you assign value of one data type to another, the two types might not be compatible with each other. If the data types are compatible, then Java will perform the...

Subscribe to Our Newsletter