This guy is an amazing lecturer. In my experience as a computer science major, teachers either teach you NOTHING ("computers do math and stuff... ummm... yeah") or assume you know EVERYTHING. ("Just make a 3D video game. Just do it. What's the big deal?")
And the worst part is, those teachers often alternate. Meaning you are 100% and completely lost and learn little to nothing correctly.
These videos are my saviour for my data structures class, with the second variety of teacher.
Thank you so much for this, you are a great teacher. I study in college in Quebec and teachers didn't go that deep. Watching this playlist I revised my courses and also learned a lot more.
@007gurkan I guess not. But the instance "qwe" you created is stored in string literal pool. So whenever you create another string literal "qwe", you are technically referring to the sane literal in the pool. This is some advanced feature about how Java manages string.
@007gurkan No, the string object "qwe" doesn't have anything pointing to it anymore so the garbage collector will pick it up and mark that memory location as available for writing. You have no way of getting back to that location in memory anymore without anything pointing to it.
they are really interested in this class they ask numerous questions. maybe its the teacher, maybe he is easy to speak with cause hes younger, maybe its because they have a interest in computer science , I think its all the above!
String s1 = s1.toUpperCase(); The professor says if this is executed a million times it will create a million objects. This is not true in the current implementation of java. Java is smart enough to recognize a string exists of the same type in memory and will point to the same one. Think of it as a writing on the wall, if it exists it is not created again. Correct me if I missed something basic.
@abhinahi81 : I don't think so. I guess you are referring to String literal pools. But in this case, you still create a new object. If, instead, you are doing String s1 = "abc", then yes, there is only one string object created and reused. Correct me if i am wrong : )
Pretty good but the answer to the question asked at 29:07 that you can't hear is:
Note: The Java programming language does not permit literal strings to span lines in source files, so you must use the + concatenation operator at the end of each line in a multi-line string. For example, String quote = "Now is the time for all good " + "men to come to the aid of their country.";
I know this stuff seems simple, but it's important to go step by step - gradually build on the subject and make sure the person is left with a start to finish understanding of the core mechanics.
I didn't mean to sound condescending or arrogant in any way. I just thought people should have a basic programming knowledge before attending a course at a University level. Just like you learn English or math before progressing.
I apologize to everyone, if I came across as disrespectful in any way. Wasn't my intention!
I love this guy. So clear and uses only blackboard. Most introductory class starts out without explaining what objects, class, etc are and it took me a long time to figure it those definitions myself. Here he gives you very concise definitions right off the bat. Berkeley CS is awesome.
I have a question. Let's say the content of s1 is changed from "jow!" to "yeah!" it makes a new object with "yeah" in it and points to that. But what happens to the object with "jow!" in it? It's just lost memory? It still exists but you can't do anything with it? That's a bit stupid isn't it? It would sound better to just replace the contents of the object to which s1 points to wouldn't it.
Yes lukez3, thanks. I started panicking too early. He was still talking about assigning variables when I posted the message. I guess I was annoyed that none of the students wanted to ask the question I was curious at :p
This guy is an amazing lecturer. In my experience as a computer science major, teachers either teach you NOTHING ("computers do math and stuff... ummm... yeah") or assume you know EVERYTHING. ("Just make a 3D video game. Just do it. What's the big deal?")
And the worst part is, those teachers often alternate. Meaning you are 100% and completely lost and learn little to nothing correctly.
These videos are my saviour for my data structures class, with the second variety of teacher.
6dark6alex6 1 week ago in playlist Computer Science 61B - Fall 2006
Omg computer science is so easy and its going to be even more easy when i get to college
xXCrypticalCodexX 1 month ago
is this new counter strike 61B?? plz answer
tullikulli 1 month ago
@tullikulli NO. This is a Computer Science class. It is a course on Java Data Structures from UC Berkeley.
And, you're welcome.
kenito2050 1 month ago in playlist UC Berkeley Java Class
Thank u
MrAppleandy 3 months ago
Thank you so much for this, you are a great teacher. I study in college in Quebec and teachers didn't go that deep. Watching this playlist I revised my courses and also learned a lot more.
mogwai142 3 months ago
nice
nasir2010khan 4 months ago in playlist Computer Science 61B - Fall 2006
He's like my lecturer except he speaks understandable English... I think I'm in love.
LORDCYBERSAURUS 7 months ago
I just wondered lets say we say
s1 = "qwe"; and then
s2 = "asd";
s1 = s2;
is there a way to refer to "qwe" string object after then without creating a new one?
007gurkan 9 months ago
@007gurkan I guess not. But the instance "qwe" you created is stored in string literal pool. So whenever you create another string literal "qwe", you are technically referring to the sane literal in the pool. This is some advanced feature about how Java manages string.
stb6688 9 months ago
@007gurkan No, the string object "qwe" doesn't have anything pointing to it anymore so the garbage collector will pick it up and mark that memory location as available for writing. You have no way of getting back to that location in memory anymore without anything pointing to it.
jimmayl1 7 months ago
something wrong dude
String s1 = "Yow!";
String s2 = "Yow!";
s1 and s2 references the same object
CEOPMAK8 10 months ago
Comment removed
tantannify 9 months ago
Please add it in English subtitles
ducefalo21 10 months ago
@ducefalo21
Why? It's in clear English? Do you have any idea how long it would take to type out 50 minutes of subtitles?
LORDCYBERSAURUS 7 months ago
they are really interested in this class they ask numerous questions. maybe its the teacher, maybe he is easy to speak with cause hes younger, maybe its because they have a interest in computer science , I think its all the above!
99SintaX 10 months ago
He looks like Spence in Criminal Minds :D
crazyrum 11 months ago
perfect
PkGivi1 1 year ago
String s1 = s1.toUpperCase(); The professor says if this is executed a million times it will create a million objects. This is not true in the current implementation of java. Java is smart enough to recognize a string exists of the same type in memory and will point to the same one. Think of it as a writing on the wall, if it exists it is not created again. Correct me if I missed something basic.
abhinahi81 1 year ago
@abhinahi81 : I don't think so. I guess you are referring to String literal pools. But in this case, you still create a new object. If, instead, you are doing String s1 = "abc", then yes, there is only one string object created and reused. Correct me if i am wrong : )
stb6688 9 months ago
This lecturer reminds me of a Hogwarts professor.
pacific14586 1 year ago
Awesome. I loved the way of his teaching.
ove614817 1 year ago
I can't stress how lucky these students are to have this lecturer. Clear, concise, and NO ridiculous confusing power point presentations.
csrocker101 1 year ago 8
Pretty good but the answer to the question asked at 29:07 that you can't hear is:
Note: The Java programming language does not permit literal strings to span lines in source files, so you must use the + concatenation operator at the end of each line in a multi-line string. For example, String quote = "Now is the time for all good " + "men to come to the aid of their country.";
daviangel 1 year ago
@ 20:50 the method toUpperCase(); is spelt with capital char 'U' and 'C' the professor spelt it wit ha lower case c
mikehacksdotcom 1 year ago
good review for stuff i dont remember
mikehacksdotcom 1 year ago
Great Lecturer
alizaytv 2 years ago 33
This has been flagged as spam show
Urodzeni Mordercy - 80.72.33.238:27600
Najlepszy z ranku otrzymuje admina(do kolejnego restartu)
Życzę miłej zabawy i dużo fragów.
Kontakt: 11635462
ziebamat 2 years ago
wow great lecture... im in my 2nd year of college studying java and have understood some things properly untill now lol
Gu3rr1lla 2 years ago 3
That's exactly what i thought haha.
xxdeetsxx 2 years ago
He does not loose time, very effective when expressing ideas!!!
JoaoBR85 2 years ago
simply loving it !!!!!!!!!!!!!!!
dupreee27 2 years ago
very good lectures..keep it up...
nayabrasul 2 years ago
he's got StYlE!!
dupreee27 2 years ago 2
I like how he sidesteps the whole idea of immutable datatypes (String) at this point of the lecture.
deseyered 2 years ago
This is awesome!!!!!! I would like to thank people at Berkeley for the great initiative. Keep up the good work.
it4rad 2 years ago
Comment removed
it4rad 2 years ago
subscribe! xD
shyle212 2 years ago
this is good. the only problem is that i think he could've used a PC and an overhead projector to display his info.
chaniwie 2 years ago 2
I know this stuff seems simple, but it's important to go step by step - gradually build on the subject and make sure the person is left with a start to finish understanding of the core mechanics.
Aliuar 2 years ago
I didn't mean to sound condescending or arrogant in any way. I just thought people should have a basic programming knowledge before attending a course at a University level. Just like you learn English or math before progressing.
I apologize to everyone, if I came across as disrespectful in any way. Wasn't my intention!
armelix73 2 years ago 6
@armelix73 you are very disrespectful....not everyone had a freaking computer bought by daddy to learn you idiot bitch
pagola 1 year ago
This comment has received too many negative votes show
Damn this is easy stuff, I learned this in high school, grade 11! "oh by the way a double slash means its a comment" O rly?
physco905 2 years ago
Part of this course is to teach Java itself and this is only the second lecture, fucking idiot. You're obviously a noob.
Newberer 2 years ago
He is either John Malkovich's nephew or he might as well be.
trombone7 2 years ago 4
lol.... his voice and the manner of speaking... that's right.
nsakic 2 years ago 3
What subject is he teaching? :-\
EsotericDesi 2 years ago
Comment removed
armelix73 2 years ago
Comment removed
deseyered 2 years ago
Comment removed
armelix73 2 years ago
I love this guy. So clear and uses only blackboard. Most introductory class starts out without explaining what objects, class, etc are and it took me a long time to figure it those definitions myself. Here he gives you very concise definitions right off the bat. Berkeley CS is awesome.
IIGrudge 3 years ago 53
@IIGrudge not being sarcastic or anything. just want to know where you are form and in which university your are
padfootpak 1 year ago
@IIGrudge great lecturer but many thing would be better typed and projected instead of chalked up, otherwise very very good lecturer
conorucd 5 months ago
is it java or c++ language course ??
so2murad 3 years ago
Java.
fahrradteile 2 years ago
thank you.
so2murad 2 years ago 2
shouldn't it be s1 = new String("") instead of s1 = new String(); at 1:25 or doesn't it matter
FATBOYFAT1990 3 years ago
They do exactly the same thing.
enos76 3 years ago
Anyone else think input in Java is more complicated than it should be?
ctrlaltjazz 3 years ago 7
I'm guessing that you haven't seen many other languages.
Java is simple considering what it is capable of. There are very few unnecessary complications.
rhillner 2 years ago
I have a question. Let's say the content of s1 is changed from "jow!" to "yeah!" it makes a new object with "yeah" in it and points to that. But what happens to the object with "jow!" in it? It's just lost memory? It still exists but you can't do anything with it? That's a bit stupid isn't it? It would sound better to just replace the contents of the object to which s1 points to wouldn't it.
Solubution 3 years ago
At 26:35, he mentions that garbage collectors take care of these strings that can no longer be accessed.
lukez3 3 years ago
Yes lukez3, thanks. I started panicking too early. He was still talking about assigning variables when I posted the message. I guess I was annoyed that none of the students wanted to ask the question I was curious at :p
Solubution 3 years ago 2
Hi! Thanks for the lectures. It's a good thing everything is explained in details. I wish we had lectures done this way.
There is a tiny error on the blackboard - the method is toUpperCase() instead of toUppercase(). Just to let you know. Cheers.
acidosen 3 years ago 4
hi.Could you tell me please if is this course about c++ or java ?
so2murad 3 years ago
he says what language it is at the start you idiot
rhillner 2 years ago