Java39


Bethany's most unique Live Music Venue, Art Gallery, Cafe', Dessert Shop and Coffee House.


Bethany's most unique Cafe, Dessert Shop, Coffee House, and Live Music and Art Show venue. Serving cafe' style meals including desserts, breakfast, lunch, dinner, appetizers and Java Dave's premium coffees. Supporting metro live music and art with open mic, featured acoustic artists, karaoke, and art shows!


Hey, All the string objects in java has the Immutable Property by which we cannot make any changes to the object after we create one string object. Now if we try to make changes to the object with the concat method and try to append the string welcome. So this will create a new string object rather than modifying the previous string object. So now we are going to do an example program and try to understand the concept of Immutable Property of strings in java. So first you are going to create one string object str which has the string hello and then we are going to use the concat method and try to append the string world after the string hello. So we are trying to modify the string object str with the concat method which append the world after the string hello. So now we are going to print the str object onto the console. So I am going to save the program. Now I am going to compile and run the program. So you can see the output is hello. So clearly the changes we tried to make here does not reflect it back to the parent string str. Instead it has returned a string and the return string we are going to use in a new string object str2 and if we print that str2 onto the console. So we are going to save the program and we are going to recompile and run the program. And you can see the output is hello world. So the changes we tried with the concat method does not reflect it to the parent string str. Instead it has returned a new string and which has been stored in the object str2. And we have used the print method and printed the str2 onto the console and which has printed the string hello world onto the console. So in java all the strings are immutable means when we create the string we cannot modify after their creation. But there are few classes These are the classes they allow us to modify the string after creation. In the later videos we are going to talk about the string buffer class and string builder class in detail. So hope you understand the concept. I will see you in the next one. Thank you.

Business Details

show address

show phone

go to website

Map
Hours
Mon 07:00 AM - 08:30 PM
Tue 07:00 AM - 08:30 PM
Wed 07:00 AM - 08:30 PM
Thu 07:00 AM - 08:30 PM open now
Fri 07:00 AM - 08:30 PM
Sat 09:00 AM - 08:30 PM

Coffee Shop in other cities

More categories in Bethany, OK