Java Tutorials | Test Your JAVA Skills | Challenge - 1 | by DURGA Sir

preview_player
Показать описание
java
Basic Java Tutorial for beginners
Basic Java Programming for beginners
Core Java By Nagoor babu
Core Java
Core Java Video Tutorials
Core Java Tutorial for beginners with examples
Core Java Tutorial
Core Java DURGASOFT
Durgasoft Core Java
Durgasoft Java
durga software solutions core java videos
durga software solutions java
How to learn java
How to learn java programming language for beginners
learn java
learn java programming for beginners
programming in java
understanding java
java application development tutorial
java beginner tutorial
java basics for beginners
java for beginners
java lessons
java lectures
java language tutorial for beginners
java programming tutorial
java programming for beginners
java tutorial for beginners
java tutorial
java tutorial by durga sir
====================================
Java tutorial by durga sir

Java 9 by durga sir

Java 1.8 Version New Features by Durga sir

Adv Java JDBC Tutorial by Durga sir

OCJA 1.8 Java SE 8 Programmer - I (1Z0 - 808 ) By Durga sir

Core Java by NagoorBabu sir

Advenced Java by Nagoorbabu sir

CoreJava by Ratan

Advanced Java jdbc by Ratan

Advjava tutorials - JSP by Ratan

Adv java servlets tutorial by ratan

Servlet and JSP Tutorial by anji reddy

Advanced Java Jdbc by Anjireddy

Hibernate byAnjireddy

Struts by Anjireddy

Spring by Mr.AnjiReddy

ADV JAVA by Naveen

Spring by Mr.Naveen

Hibernate by Mr. Naveen

Struts by Mr.Naveen

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

In code1 : change either class keyword to Interface or add abstarct kW to both method and class or provide method body

ravurisandeep
Автор

yes, 1st question is valid if you will only consider the logic
yes, 3rd one is valid
4th one is may be compiler error because abstract classes contain methods that defaultly abstract we dont want to again initialize method as abstract

v.bhavana
Автор

1. compile time error because method body not declared
2.compile time error because abstract metod does not have a body
3.C.E BECAUSE PARENT IS NOT ABSTRACT.
4.COMPILE SUCCESFULLY.

Автор

1:-invalid method should have body
2:-invalid abstract method can't have body
3:-vaild
4:-missed while writing answers
5:- invalid all method should be overridden
6:-all methods should be overridden in child class

sujeetarya
Автор

Coding Snippet 4 is valid because as the class is having one abstract method the class should be abstract and here the class is abstract and hence acceptable.

swarupsarkar
Автор

1)missing method body or declared class as abstract.
2)abstract method cann't have a body.
3)class should declared as abstract.
4)valid.
5)valid.
6)subchild class should be declared as abstract.

getwaystar
Автор

4th one valid because a abstract class contain a abstract method declaration without any problem

balsaviclasses
Автор

Coding snipeer-1
Ans:- Invalid
Reason;-CE:-missing method body or declare abstract

badshahduwan
Автор

1)ans: we should declare method and class as a abstarct otherwise we should provide body for method m1()
2)Invalid: a)abstarct method doesn't contains body
b)remove body and declare class also abstract

3)Invalid: we should declare class as abstract otherwise we provide body for m1()

4)Valid

5)Invalid: we should override m2 method else we should declare subclass also as abstarct

6)Invalid : We should override m2() method in child class or Subchild class otherwise we should declare Subchild class as abstract

TeluguTravelDiaries
Автор

1, 2, 3 invalid : Class must be abstract if any one method is abstract
4: valid
5: invalid, if child extends abstract, child must have to override all abstract method, or make child abstract.
6: valid.

rkrohit
Автор

Good Evening Sir ji.
1. Compile time error.
Missing method body.
2. Compile time error.
Abstract methods cannot have a body
3. Compile time error.
Parent is not abstract and does not override abstract method m1( ) in Parent class Parent
4. Valid
5. Compile time error.
Child is not abstract and does not override abstract method m2( ) in Parent class child extends parent.

tanujroy
Автор

please provide the link to the video that contains answers of these questions

themrambusher
Автор

Snippet Six we are getting any compile-time error because we know that if the Parent class is abstract and the child is also abstract then the Child class may or may not provide the implementation but if we are creating the Sub child class of the child class then the Sub child has compulsory provide the implementation for all the method that is present in the parent class

deepkumar
Автор

Snippet third is also the invalid because the abstract class can contain the abstract method
but the class parent is the non abstract so that why we are getting the compile-time error in that case

deepkumar
Автор

1 valid
2 invalid
abstract method not have a body
3 invalid
: if a class have a abstract method, the class must be abstract
4 valid
:class is abstract and it have abstract method not having a body
5 invalid
: extend a abstract method .. the parent class must be implement all the abstract methods
6 invalid

vipijithn
Автор

Snippet four is the valid we are not getting any compile time error in the case

deepkumar
Автор

coding snippet-1 the method in this class has no implementation so it should be declared as abstract. If we declare m1() as abstract the class should be declared as abstract.

coding snippet-2 if a class contains atleast one abstract method, the class should be declared as abstract.

coding snippet-3 if a class contains atleast one abstract method the class should be declared as abstract.

coding snippet-4 correct both the class and method declared as abstract.

coding snippet-5 if a class extends abstract class all the methods present in the abstract class should be implemented in the extending class.

coding snippet-6 as base class is declared as abstract whatever the abstract methods present in the root class should implemented in the subbase class.

gandheshiva
Автор

1.Invalid.
because class is not abstract or method does not have implimentation.
2.Invalid.
because abstract method dont have implimentation block should be end with semicolon.
3.invalid.
because if method is abstract class must be abstract class or interface
4.Valid
5. Invalid
because child class not implimented both the parent class method or not declered as abstract class
6. Invalid .
Because Abstract method m2() not implimented in its child classes or subchild class not declared as abstract.

rrhegde
Автор

Coding Snippet 1 is invalid
because we declare the method m1() but we do not provide any implementation to the method m1() but the method m1 is not abstract we know that the method is declared only when the method is abstract so that's why this method is the invalid
valid code of this example is
class Parent{
abstract public void m1();
}
now this code is valid

deepkumar
Автор

sir first is invalid because of this method not mention abstract if method is abstract then class is also abstract

tiktokrockstar