Print String Variable

This program prints the value of a string variable.

Problem Statement

Write a Java program that declares a string variable and prints its value.

Source Code

1 public class PrintString {
2 public static void main(String[] args) {
3 String company = "Eduinq";
4 System.out.println("Company name: " + company);
5 }
6 }

Program Output

Company name: Eduinq

Explanation

A string variable company is declared with the value "Eduinq" and printed along with a descriptive message, demonstrating string variable declaration and printing.

Quick Links to Explore