. What are primitive data types in Java

1. What are primitive data types in Java? Is String a primitive data type? Why we can’t use == to compare the values of two strings?

2. How to declare and use arrays of objects? What are the benefits of using arrays of objects?

3. Take a look at code blow, why we will get some errors from JAVA compiler?

public class cp3myclass {

public static void test1(){}

public void test2(){}

private static void test3(){}

private void test4(){}

}

public class cp3staticmethod {

public static void main(String[] args) {

cp3myclass t1 = new cp3myclass();

t1.test1();

cp3myclass.test1();

t1.test2();

cp3myclass.test2();

t1.test3();

cp3myclass.test3();

t1.test4();

cp3myclass.test4();

}}

"Is this question part of your assignment? We can help"

ORDER NOW