Java Interview Questions and Answers - New Version In Hindi #12(Part-4)
1,329 views · Published 14 January 2018 · 14:07 · Indexed 8 November 2026
Channel: AndroJavaTech4U · 2018 · Science & Technology
This videos have basic java interviews questions and answers about
What are the Initializers in java .?
What is the use of Initializers.?
How many Type of Initializers .?
How we can create the Initializers .?
Program1-
class Employee
{
String name;
int age,id;
Address adr;
Salary sal;
Employee(String n,int a,int i)
{
name=n;
age=a;
id=i;
}
{
adr=new Address();
}
{
sal=new Salary();
}
void showInfo()
{
System.out.println(name+" "+age+" "+id);
System.out.println(adr.city+" "+adr.state+" "+adr.country);
System.out.println(sal.ta+" "+sal.da+" "+sal.hra);
}
public static void main(String a[])
{
Employee e=new Employee("ram",23,111);
e.showInfo();
}
}
class Address
{
String city,state,country;
{
city="noida";
state="up";
country="india";
}
}
class Salary
{
int ta,da,hra;
{
ta=100;
da=200;
hra=300;
}
}
object cloning part-1
https://www.youtube.com/watch?v=oBmHMEGxKr4&t=27s
object cloning part-2
https://www.youtube.com/watch?v=B3OwNM4gKD0&t=131s
OOps ques/ans session-1 url:-
https://www.youtube.com/watch?v=xYaH5ZmKbzA&index=1&list=PLnfapp4Woqpq1VOZuvB0Gb_pe7By2cF3_
OOps ques/ans session-2 url:-
https://www.youtube.com/watch?v=T6kRMnyM0ro&index=2&list=PLnfapp4Woqpq1VOZuvB0Gb_pe7By2cF3_
OOps ques/ans session-3 url:-
https://www.youtube.com/watch?v=a4MiDc2rrxE&index=3&list=PLnfapp4Woqpq1VOZuvB0Gb_pe7By2cF3_
OOps ques/ans session-4 url:-
https://www.youtube.com/watch?v=qvLMFyEqjyk&index=4&list=PLnfapp4Woqpq1VOZuvB0Gb_pe7By2cF3_
https://www.youtube.com/watch?v=K3vYHJh0lcE&t=62s
https://www.youtube.com/watch?v=IpsXqpIQHtI&t=25s
https://www.youtube.com/watch?v=SOTjxjbCgmc&t=25s
https://www.youtube.com/watch?v=8jxCCzonDMU&t=25s
Connect on Socials:-
Facebook:- https://www.facebook.com/AndroJavaTech4U/
Twitter:- https://twitter.com/AndroJavaTech4U
Google Plus:- https://plus.google.com/u/0/+AndroJavaTech4U
LinkedIn:- https://www.linkedin.com/in/androjavatech4u/
More from this channel
-
18:08
Platform Independency Features of Java In Hindi #1
-
4:42
VMware Workstation Install With RedHat
-
8:35
Difference Between Program and Process
-
2:51
jconsole tool of java
-
5:38
JVM ( java virtual machine) architecture - tutorial
-
4:30
Java Fundamentals In Hindi #2 (Keyword In Java)
-
2:26
Working On WebLogic Server 12C In Hindi #2
-
21:59
Login and Registration Part1