Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
Hello Shivam Tripathi. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
public static void main(String ar[]) { System.out.println("Test class printer");
} } Output: C:\Users\user\Documents\mycode\scjp\src>javac Test.java C:\Users\user\Documents\mycode\scjp\src>java Test Test class printer C:\Users\user\Documents\mycode\scjp\src>java Test$StaticNestedClass static nested inner class
Hello Pratap. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
Hello Utsav. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
Hello Panda, Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/U1KKyi You an see more Java videos following link: Java tutorial by durga sir goo.gl/XWb4RL Java 9 by durga sir goo.gl/hXGyBW Java 1.8 Version New Features by Durga sir goo.gl/iHXXYU Adv Java JDBC Tutorial by Durga sir goo.gl/8q16Eo OCJA 1.8 Java SE 8 Programmer - I (1Z0 - 808 ) By Durga sir goo.gl/gC6R7f Core Java by NagoorBabu sir goo.gl/s6Nvj1 Advenced Java by Nagoorbabu sir goo.gl/ZZonzJ CoreJava by Ratan goo.gl/3VM19v Advanced Java jdbc by Ratan goo.gl/Rn2UXr Advjava tutorials - JSP by Ratan goo.gl/Z6ytxm Adv java servlets tutorial by ratan goo.gl/zTwi9y Servlet and JSP Tutorial by anji reddy goo.gl/jZMRUv Advanced Java Jdbc by Anjireddy goo.gl/16CGzX Hibernate byAnjireddy goo.gl/qQojvZ Struts by Anjireddy goo.gl/nE1Eof Spring by Mr.AnjiReddy goo.gl/NfN14R ADV JAVA by Naveen goo.gl/bhSsXF Spring by Mr.Naveen goo.gl/huVwFN Hibernate by Mr. Naveen goo.gl/TY3Wpd Struts by Mr.Naveen goo.gl/Vkmiw7
yes we can public class Test2 { static void m1() { System.out.println("Hello ... i am static method"); } void m2() { System.out.println("Hello ... i am instance method"); } static class A { static void m1() { Test2 t = new Test2(); Test2.m1(); t.m2(); System.out.println("work done by static m1 method of class A"); } void m2() { Test2 t = new Test2(); Test2.m1(); t.m2(); System.out.println("work done by m2 method of class A "); } } public static void main(String[] args) {
A obj = new A();
A.m1(); obj.m2(); } } output : Hello ... i am static method Hello ... i am instance method work done by static m1 method of class A Hello ... i am static method Hello ... i am instance method work done by m2 method of class A
here is my program a.java class test { static class nested { public static void main(String arg[]) { System.out.println("inner class mm"); } } public static void main(String arg[]) { System.out.println("outer class mm"); } } mrx@hp-laptop:~$ javac a.java mrx@hp-laptop:~$ java test outer class mm mrx@hp-laptop:~$ java test$nested outer class mm after executing both inner and outer class i am getting main method of outer class only please reply sir
Hello sir as you explain if we want to call static class method outside of outer class than we have create static class object using outer class name, but i try that with out using outer class object and program executed successfully \ i am using java 8 so there is any new feature for this in java 8 here is my code package static_nested_class; public class Outer { static class Inner{ public void ss() { System.out.println("inside static class method "); } } } package static_nested_class; import static_nested_class.Outer.Inner; public class Test { public static void main(String[] args) { Inner i= new Inner(); Inner.ss(); } } sir please tell me the reason for that... please sir
Thanks a lot for every video of yours. You have so much patience while teaching.
I really appreciate your effort.
one of the best Teacher of SCJP @DurgaSir
Hello Friend.
Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
goo.gl/kqvaf2
Completed watching on Sept-09, 2024 at 7.54 PM :)
real guru on the floor💯💯
Hello Shivam Tripathi.
Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
goo.gl/kqvaf2
Sir, Normal or Regular inner class is allowing to declare static member sir. For Example
public class Test {
class StaticNestedClass {
public static void main (String ars[]) {
System.out.println("static nested inner class");
}
}
public static void main(String ar[]) {
System.out.println("Test class printer");
}
}
Output:
C:\Users\user\Documents\mycode\scjp\src>javac Test.java
C:\Users\user\Documents\mycode\scjp\src>java Test
Test class printer
C:\Users\user\Documents\mycode\scjp\src>java Test$StaticNestedClass
static nested inner class
Hello Venkatesh.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
103th video completed❤
crystal clear explaination ......
Hello Pratap.
Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
goo.gl/kqvaf2
Thanks sir, your video awesome and i really appreciate your teaching.
Hi Patel. Thank you very much for your feedback
Thanks sir.............................
Durga sir Please make a video on Event Handling of yours others faculty have explained these but i didn't get properly bcz i like your way of teaching
do one android program u ll get it
Perfect explanation🎉
Hello Utsav.
Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
goo.gl/kqvaf2
❤
Sir
Please add applet and
Swing and GUI classes
Please sir.
Hello Friend.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
Thanks so much, Durga Sir.
Thanks a lot of your every video. Please make a videos on shorting techniques like Bubbleshort, insertion short, quick and mergshorts
Hello Murali.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
Its Sort not Short
we can declare static members in normal inner class also in new versions.
Hello Friend.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
Can you explain the concept of weak reference in static nested classes ???
Hello Nikhil.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
thanks durga sir ..
Hello Panda,
Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos.
You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
goo.gl/U1KKyi
You an see more Java videos following link:
Java tutorial by durga sir
goo.gl/XWb4RL
Java 9 by durga sir
goo.gl/hXGyBW
Java 1.8 Version New Features by Durga sir
goo.gl/iHXXYU
Adv Java JDBC Tutorial by Durga sir
goo.gl/8q16Eo
OCJA 1.8 Java SE 8 Programmer - I (1Z0 - 808 ) By Durga sir
goo.gl/gC6R7f
Core Java by NagoorBabu sir
goo.gl/s6Nvj1
Advenced Java by Nagoorbabu sir
goo.gl/ZZonzJ
CoreJava by Ratan
goo.gl/3VM19v
Advanced Java jdbc by Ratan
goo.gl/Rn2UXr
Advjava tutorials - JSP by Ratan
goo.gl/Z6ytxm
Adv java servlets tutorial by ratan
goo.gl/zTwi9y
Servlet and JSP Tutorial by anji reddy
goo.gl/jZMRUv
Advanced Java Jdbc by Anjireddy
goo.gl/16CGzX
Hibernate byAnjireddy
goo.gl/qQojvZ
Struts by Anjireddy
goo.gl/nE1Eof
Spring by Mr.AnjiReddy
goo.gl/NfN14R
ADV JAVA by Naveen
goo.gl/bhSsXF
Spring by Mr.Naveen
goo.gl/huVwFN
Hibernate by Mr. Naveen
goo.gl/TY3Wpd
Struts by Mr.Naveen
goo.gl/Vkmiw7
please sir upload video of awt and gui based please sir
Hi Aman. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627
Durga sir, Why can't we have static method in a non-static inner class ?
Sir i have a doubt. Instance variable is a part of stack area and object is a part of heap area then how can instance variable part of object?
Which version sir is explaining
Sir one doubt, if we can access static nested class directly, then what is the need of declaring the class inside another class.
Can we create object of outer class inside static inner class
Hello Yaduwanshi.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627,7207212427/28
yes we can
public class Test2 {
static void m1() {
System.out.println("Hello ... i am static method");
}
void m2() {
System.out.println("Hello ... i am instance method");
}
static class A {
static void m1() {
Test2 t = new Test2();
Test2.m1();
t.m2();
System.out.println("work done by static m1 method of class A");
}
void m2() {
Test2 t = new Test2();
Test2.m1();
t.m2();
System.out.println("work done by m2 method of class A ");
}
}
public static void main(String[] args) {
A obj = new A();
A.m1();
obj.m2();
}
}
output :
Hello ... i am static method
Hello ... i am instance method
work done
by static m1 method of class A
Hello ... i am static method
Hello ... i am instance method
work done
by m2 method of class A
Sir u r aawesome teacher but you r somewhat slow plz increase your speed.
even i think so that's why i watch his videos at 2x speed
here is my program
a.java
class test
{
static class nested
{
public static void main(String arg[])
{
System.out.println("inner class mm");
}
}
public static void main(String arg[])
{
System.out.println("outer class mm");
}
}
mrx@hp-laptop:~$ javac a.java
mrx@hp-laptop:~$ java test
outer class mm
mrx@hp-laptop:~$ java test$nested
outer class mm
after executing both inner and outer class i am getting main method of outer class only please reply sir
Hello Friend.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
Here, we have to escape the $ by adding a backslash before it. Use `java test\$nested ` and it will work fine.
Hello sir
as you explain if we want to call static class method outside of outer class than we have create static class object using outer class name,
but i try that with out using outer class object and program executed successfully \
i am using java 8 so there is any new feature for this in java 8
here is my code
package static_nested_class;
public class Outer
{
static class Inner{
public void ss()
{
System.out.println("inside static class method ");
}
}
}
package static_nested_class;
import static_nested_class.Outer.Inner;
public class Test
{
public static void main(String[] args) {
Inner i= new Inner();
Inner.ss();
}
}
sir please tell me the reason for that... please sir
without importing Outer.Inner u try.....u get C.E