This one took me a couple of times of watching it, stopping it, backing it up, listening to what you say and trying to put it all together. Then suddenly it was like a light came on. I am so appreciative of your style of teaching. Thank you so much!
For some reason, today when I open this project in intellij, it is giving me an error ('; expected' '; expected' 'expression expected'). This is literally the same code I was playing with yesterday as I was following along with you on this video. When I was done for the night, I simply closed intellij. Now, I cant create ANY methods without getting this error. What am I doing wrong? Any ideas? The errors are appearing where I have marked with an '*' private static void myMethod*(*int num)*{ if (num % 2 == 0) System.out.println(num + " is even"); else System.out.println(num + " is odd"); }
those "*'s" aren't in the actual code. In the above code, they indicate where I'm receiving those error messages. Here's a google doc with the code so you can copy and paste to see if you get the same error (if you wish), along with some screenshots showing you the actual error messages I'm referring to: docs.google.com/document/d/11lmN2tm2RRXUc8vHZ-VW7VkfVulpEu9NPmqZbofctbg/edit?usp=sharing
I love that you’re very clear! I’ve taken Java in college but have forgotten how to write anything in Java. This is definitely bringing back what I previously learned. Thank you for the videos. You’re very good at explaining. Yes, I did stopped the video a couple of times to understand what you were explaining, but not because of you but because of me (my brain). You’re very good! You got me to subscribe :)
I have watched several videos by you. I am preparing for upcoming interviews- These videos are helping me a lot to review the concepts and learn some new ones- in very less time :-). Thanks !!
ok why does this solution work at 7:15 ? string should only have 1 value. so after you run the isEven(num:4) then next time you run it, as isEven(num37) it should give an error since the isEven function uses the String str all the way through, so after it gets a value "is even" it should never change value to "odd" or anything, since it already took the string value of "4 is even". or is that somehow an exception too that when you write string somehow the java uses Stringbuffer? or does the parameter change from 4 to 37 creates a new instance of isEven where the new str is not the same object as the previous str?
Thank you for your very clear tutorials. Unfortunately, unless I'm missing something, the code at 5:02, lines 9 to 15 gives an error message. To work, there should be no num in brackets: isEven(4); isEven(5); isEven(6); isEven(11);
can you explain few more examples in methods? I am not sure about this topic where I have to write code and where I have to return.please explain sir......thank you
This one took me a couple of times of watching it, stopping it, backing it up, listening to what you say and trying to put it all together. Then suddenly it was like a light came on. I am so appreciative of your style of teaching. Thank you so much!
Thanks a lot. Do watch and comment on other videos as well.
For some reason, today when I open this project in intellij, it is giving me an error ('; expected' '; expected' 'expression expected'). This is literally the same code I was playing with yesterday as I was following along with you on this video. When I was done for the night, I simply closed intellij. Now, I cant create ANY methods without getting this error. What am I doing wrong? Any ideas?
The errors are appearing where I have marked with an '*'
private static void myMethod*(*int num)*{
if (num % 2 == 0)
System.out.println(num + " is even");
else
System.out.println(num + " is odd");
}
Remove that *
those "*'s" aren't in the actual code. In the above code, they indicate where I'm receiving those error messages. Here's a google doc with the code so you can copy and paste to see if you get the same error (if you wish), along with some screenshots showing you the actual error messages I'm referring to: docs.google.com/document/d/11lmN2tm2RRXUc8vHZ-VW7VkfVulpEu9NPmqZbofctbg/edit?usp=sharing
I love that you’re very clear!
I’ve taken Java in college but have forgotten how to write anything in Java. This is definitely bringing back what I previously learned.
Thank you for the videos. You’re very good at explaining.
Yes, I did stopped the video a couple of times to understand what you were explaining, but not because of you but because of me (my brain).
You’re very good! You got me to subscribe :)
I have watched several videos by you. I am preparing for upcoming interviews- These videos are helping me a lot to review the concepts and learn some new ones- in very less time :-). Thanks !!
Man you are the best Java tutor... Love you
+Think Techy thanks alot
ok why does this solution work at 7:15 ? string should only have 1 value. so after you run the isEven(num:4) then next time you run it, as isEven(num37) it should give an error since the isEven function uses the String str all the way through, so after it gets a value "is even" it should never change value to "odd" or anything, since it already took the string value of "4 is even".
or is that somehow an exception too that when you write string somehow the java uses Stringbuffer? or does the parameter change from 4 to 37 creates a new instance of isEven where the new str is not the same object as the previous str?
thanks bro, you are good at teaching and explaining concepts very simply
You are a Great Teacher i easily understand several concepts
Thank you. Keep. Commenting and like all videos. Support us
simply amazing, keep it up
Very helpful bro,,,,ur method iz very simple and easy to understand.
yo.. thansk for complements
Thank you for your very clear tutorials.
Unfortunately, unless I'm missing something, the code at 5:02, lines 9 to 15 gives an error message. To work, there should be no num in brackets:
isEven(4);
isEven(5);
isEven(6);
isEven(11);
there is no num in bracket it's just the ide showing the programmer what it's pertaining to when the integer values are used
Arigato👌😊
cool bro!!!
Explain more examples in methods. I totally confused in this topic. Please explain sir....
Sir please tell if I can practise coding in my android phone... because I dont own any computer
Yes, I have an app called Java N-IDE, but I'm sure there are many others.
plz sir help i write as you said in video and it didint work well
code:-
public class ss
{
public static void main(String[] args) {
isEven( num: 4);
}
private static void isEven(int num) {
if (num % 2 == 0)
System.out.println(num +" is even");
else
System.out.println(num +" is odd");
}
}
compilation error:-
-syntax error in token : invalid assignment operator.
-num cannot resolved to variable.
//plz help me//
You have to take the class Main and also you have to change that return type then u get output
let's try Bhayya......
I think, today you have already become expert. don't you?
Sir methods are 4 types
1) no input,no output
2) no input,output
3)input,output
4)input,no output
Plzz make video on this concept if u can
sir there is problem not showing output
I guess you have taught core java on internshala right?
Please explain "return type"
Concept of return type please....
can you explain few more examples in methods? I am not sure about this topic where I have to write code and where I have to return.please explain sir......thank you