• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Abstract clss

 
Malhar Me
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • 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?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49371
62
  • Mark post as helpful
  • send pies
  • 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.
 
Gokul Nanthakumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Pie
Posts: 49371
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may be correct about typing errors, Gokul Nanthakumar. Malhar Me, please remember this.
 
Maneesh Godbole
Saloon Keeper
Posts: 11065
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Malhar Me wrote:

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