Write a java program to get the length of a given string.
Java Programming Language / String in java
980Program:
public class Exercise { public static void main(String[] args) { String str = "example.com"; // Get the length of str. int len = str.length(); System.out.println("The string length of '"+str+"' is: "+len); } }
Output:
The string length of 'example.com' is: 11 Press any key to continue . . .
Explanation:
None
This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.
# C Tutorials
# JAVA Tutorials
# HTML Tutorials
# Computer Fundamental
# Data Structure
# DBMS Tutorials
SQL
# C# Language
# R Language
# PHP
# Python
# Vue JS