Subjects
PRICING
COURSES
SIGN IN
Start Free Trial
Kevin T.
Senior Undergrad at USC pursuing Bachelor's in Computer Engineering and Computer Science
Tutor Satisfaction Guarantee
Java Programming
TutorMe
Question:

What does it mean for a String in Java to be immutable?

Kevin T.
Answer:

Immutable Strings in java basically means once a String is created, the String object cannot be changed no matter what. However, the reference to the String object can be changed. For example: String s = "some string"; //created an immutable string object. s variable references the object s = "a new string"; //created another immutable string object. s variable drops reference to "some string" object and now references "a new string" object

C++ Programming
TutorMe
Question:

What is the output of the following code snippet? int number= 5; cout << number++ << endl;

Kevin T.
Answer:

Output: 5 The output is 5 because number is initialized to 5, and is only incremented after the cout line because number++ means number is incremented afterwards. If on the other hand we were to replace number++ with ++number, the output would be 6 because ++number means number is incremented beforehand.

C Programming
TutorMe
Question:

Any program that can be completed via while loop can also be completed via for loop

Kevin T.
Answer:

true

Send a message explaining your
needs and Kevin will reply soon.
Contact Kevin
Ready now? Request a lesson.
Start Session
FAQs
What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Session" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.