• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Abstract clss

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Just want to confirm this:

abstract class test1 {
public void myTest(){
}
public abstract void another test();
}



public class maintest extends test1{
public static void main(String [] args){
test(){}
myTest(){}
}
}

Will it work?
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please use the code button?

What do you think? You ought to be able to work out the answer simply by reading that code.
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Malhar Me wrote:Hi,

Just want to confirm this:

abstract class test1 {
public void myTest(){
}
public abstract void another test();
}



public class maintest extends test1{
public static void main(String [] args){
test(){}
myTest(){}
}
}

Will it work?



I think there is a typing mistake in this... you mean this

public class maintest extends test1{
test(){}

myTest(){}


public static void main(String [] args){


}
}
 
Campbell Ritchie
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may be correct about typing errors, Gokul Nanthakumar. Malhar Me, please remember this.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Malhar Me wrote:


Please check your private messages for an important administrative matter
 
reply
    Bookmark Topic Watch Topic
  • New Topic