Java Tutorial for Beginners - 23 - The Default Constructor

preview_player
Показать описание
Let's talk about that all important default constructor and that is all about. And here's to you Java ... I hope you're running all the robots in 50 years.
Рекомендации по теме
Комментарии
Автор

Better than my professor...Subscribed 

PhoHmooAmerica
Автор

Great teaching tutorials. One of the best on youtube!

SycAamore
Автор

Why is this guy not getting more views.... It's crystal clear.

karthikp
Автор

Yeah great work better than my professor

ashrithareddyrondla
Автор

gosh, was looking for such explanation 4 a while! THX

barbie
Автор

I've read 'Horstmann, Farrell and Dummies books' and the default constructor seemed inconsequential to say the least, so enjoyed this this video immensely thanks.

johnh
Автор

you are doing an amazing job, lot better than Lynda and Udacity.

MrSimospirit
Автор

Do you have any videos on JUnit testing?

jameswhyte
Автор

Is this an example of default/explicit constructor? Why was the output 1, 100, 25?

public class JavaProgram1 {
int x = 25;

public static void main(String[] args) {
JavaProgram1 app = new JavaProgram1();
{
int x = 5;
}
{
int x = 10;
}
int x = 100;
System.out.println(x);
System.out.println(app.x);

}
public JavaProgram1()
{
int x = 1;
System.out.println(x);
}
}

ReinAbrera
Автор

I noticed that if I make my variable x static, that it will work without the default constructor if I just ask it to print x in the public static void main method. why is that?

jennaalden
Автор

Why are we calling this a constructor now? Isn't this just the same as an instance of an object?

SorenBagley
Автор

this guy sounds soooo BM LMAO easy to understand hahaha XD

theangrychicken