what is the difference between the two
String strHello2 = “Hello”;
String strHello2 = new String(“Hello”);

i have learned stings are immutable in java what does it mean?

differnce between instance and class variablea and methods(in clear)

pleae try to answer me.

You are asking questions that are assignment to you. I am not supposed to answer this for you, but I will give you a couple links for you to look at. Please do not be lazy next time and search on the Internet or read from text books...

Read this for your first question.

Read this for your second question

May read this for your third question (for some idea)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.