Core Java Programming Challenges #2 | Coding Challenges | Naresh IT

preview_player
Показать описание
Core Java Programming Challenges #2 | Coding Challenges | Naresh IT

💡 Also Watch

Java Programming Tutorials by Mr.Hari krishna:
Advanced Java Programming Tutorials by Mr.Nataraj:

Subscribe to our channel and hit the bell 🔔🔔🔔 icon to get video updates.

💡 Visit Our Websites
#CoreJava_Programing #Challenges #CoreJava #Quiz
--------------------------

💡 About NareshIT:

"Naresh IT is having 14+ years of experience in software training industry and the best Software Training Institute for online training, classroom training, weekend training, corporate training of Hadoop, Salesforce, AWS, DevOps, Spark, Data Science, Python, Tableau, RPA , Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in USA, Hyderabad, Chennai and Vijayawada, Bangalore India which provides online training across all the locations

--------------------------

💡 Our Online Training Features:
🎈 Training with Real-Time Experts
🎈 Industry Specific Scenario’s
🎈 Flexible Timings
🎈 Soft Copy of Material
🎈 Share Videos of each and every session.

--------------------------

💡 Please write back to us at

--------------------------

💡 Check The Below Links

Рекомендации по теме
Комментарии
Автор

instead of giving this kind of challenges give complete code explanation on core java that srinivas sir given for data structure and c programming

we also want mr. srinivas to give lectures on c++ and core java

saravanakumaran
Автор

Sir please provide code afterwards... So that we can check.

ShivaniSharma-fpgy
Автор

public class challange2 {

public challange2() {
System.out.println("First Constructor");
}
public challange2(int i) {
this();
System.out.println("Second Constructor - " + i);
}
public challange2(int j, String k) {
this(2);
System.out.println("Third Constructor " + j +" " + k);
}
public static void main(String[] args) {
new challange2(20, "Main");
}
}


OutPut:

First Constructor
Second Constructor - 2
Third Constructor 20 Main

SaritaSinghsarita
Автор

public static void main(String[] args){
Test t =new Test(10, 20);
}
Test(int x, int y)
{
this.Test(x);
}
Test(int x)
{
this.Test();
}

codejayam
Автор

this keyward is refrence variable that refer to the ✔✔✔current object✔✔✔ not a present object

manojpal-kbcj
Автор

Thanks a lot for such a wonderful session s

arabindamohanty
Автор

public class Main
{
public Main(){
this(10);
System.out.println("hi");
}
public Main(int x){
this(2, 6);

}
public Main(int z, int y){
System.out.println("by");
}
public static void main(String[] args)
{

Main m=new Main();

}
}

jyotisankardas
Автор

class Temp {
Temp () {
this( 5) ;

}
Temp(int x){
this (5, 10);
System.out.println("first");
}
Temp (int x, int y){
int c= x*y;
System.out.println(c);

}
}
public class Main {

public static void main(String[] args)
{Temp T = new Temp();
}}

sarmadrehman
Автор

package p1;


public class A {

A(){
System.out.println("Hi");
}
A(int a){
this();

}
A(int b, String str){
this(20);
System.out.println("bye");

}
public static void main(String[] args) {
A a1=new A(10, "santosh");
}

}

kaviapnasuno
Автор

public class reversestring {

int x=10;
int y=20;
reversestring()
{

System.out.println("Default constructor");
}
reversestring(int x)
{ this();
System.out.println("single instance constrctor");
}
reversestring(int x, int y)
{
this(10);
System.out.println("Multiple instance constrctor");
}

public static void main(String[] args)
{
reversestring rev= new reversestring(10, 20);
}
}

sreedharkamera
Автор

sir please check:


public class Challenge_2 {
public Challenge_2()
{

System.out.println("hi");
}
public Challenge_2(int x)
{
this();
System.out.println("hello");
}
public Challenge_2(int i, int j)
{
this(i);
System.out.println("bye bye");
}
}
class UseChallenge_2{
public static void main(String[] args) {
Challenge_2 obj=new Challenge_2(2, 3);
}
}

SubhamKumar-wbcj
Автор

public class Index {

Index(){

this("abc");
with no argument ");
}
Index(String s){
this(5, "abc");
with one argument ");
}
Index(int a, String s){
with Two argument");
}

public static void main(String[]args)
{
Index trial = new Index();
}
}

nishantraj
Автор

class A
{
A()
{
System.out.println("this is default contsructor");
}
A(int x, int y)
{
this();
System.out.println("this is two int constructor : "+x+" "+y);
}
A(String x, double y)
{
this(10, 20);
System.out.println("this is string and float type constrctor : "+x+" "+y);
}
}
public class Test {

public static void main(String[] args) {

A a = new A("pankaj", 10.25);
}

}

pankajaklade
Автор

package challenges;

public class challange_2 {

challange_2() {

System.out.println("hi");
}
challange_2(int x){
this();
System.out.println("hello");
}
challange_2(int x, int y ){
this(10);
System.out.println("bye");
}

public static void main(String[] args) {
challange_2 c2=new challange_2(10, 20);
}
}

manojpal-kbcj
Автор

class Test
{
Test()
{
this(5);
System.out.println("Hii");
}
Test(int x)
{
this(5, 15);
System.out.println("Hello");
}
Test(int x, int y)
{
System.out.println("Bye");
}
public static void main(String args[])
{
Test t1=new Test();
}
}

vivektiwari
Автор

class Challang2{

public Challang2(){

System.out.println("hi");
}
public Challang2(int a){
this();

}
public Challang2(int a, int b){
this(3);
int c=a+b;

System.out.println("hi"+c);
}
public static void main(String [] ar){


new Challang2(4, 7);
}
}

poonampatel-cnge
Автор

sir can we do this with super class?
class A
{
A()
{
System.out.println("This is A");
}
}
class B extends A
{
B()
{
super();
System.out.println("This is B");
}
}
class C extends B
{
C()
{
super();
System.out.println("This is C");
}
}
public class Challenge2
{
public static void main(String[] args)
{
C obj=new C();
}
}

YashPavaskar
Автор

public class Test7 {
Test7() {
this(10);
System.out.println("0 Param construtor is called");

}

Test7(int x) {
this(12, 15);
System.out.println("1 int Param construtor is called");
}

Test7(int x, int y) {
System.out.println("2 Param construtor is called");
}

public static void main(String[] args) {
Test7 test = new Test7();

}

}

raviraj
Автор

public class SameClass {

SameClass()
{

}
SameClass(int arg)
{
this();
System.out.println("hi");
}
SameClass(int arg1, int arg2)
{
this(29);
System.out.println("Bye");
}
public static void main(String[] args) {
SameClass s= new SameClass(10, 20);
}
}

shilpar
Автор

Public class xyz()
{
xyz() {
S. O. P("No parameter constructor is called") ;
Test(10) :
}

Xyz(int a)
{
Sysout("constructor with one parameter is called") ;
Test(65, 78)
}

Xyz(int a, int b)
{ Sysout("constructor with two parameter is called") ;
}

P. S. V. M(String arga[])
{
new xyz() ;
}
}

// Now all the three constructor will get called at once

RahulGupta-xcfg
visit shbcf.ru