Chapter 14 - Exercise 10

(3) Write a program to determine whether an array of char is a primitive type or a true Object.

class TestChar{
    public static void main(String[] args){
        char[] c={'a','b','c'};
        System.out.println(c instanceof char[]);
        System.out.println(c instanceof Object);

Need Java Developers? Hire Me »

I know Java. Talk is cheap, watch my code.

I live in CANADA now.