String data type

Is there a string Data type reliable for Variables in Java? Because i want to make a code like, string s = "Str"; if (s.equals("Str")){ System.out.println("String"); } else { System.out.println("Some other Data Type"); }
But seems like I can’t find a Data Type for strings.
Thank you :relieved:

1 Like