is string a primitive type or derived type?

String is not a primitive type, it is a derived type.

Example

public class Main {
 
    public static void main(String[] args) {
        String dataBase = "Oracle";
        System.out.println("DataBase: " + dataBase);
        String myWebsite = new String("w3spoint.com");
        System.out.println("Website: " + myWebsite);
    }
}

Output

Language: java
Website: w3spoint.com

Java interview questions on String Handling

Please follow and like us:
Content Protection by DMCA.com
togel situs toto situs togel situs toto situs toto agen togel situs togel situs togel togel situs togel resmi situs togel situs togel situs toto link togel togel online