Solved

also overloading methods!

Posted on 2002-04-17
3
169 Views
Last Modified: 2010-03-31
which one of the following is wrong and why
 
class student
{
public student(){}

public student (int a){}
public student (int b) {}
public student (in a,int b){}
public student (double a){}
public student (double a,double b){}

}

0
Comment
Question by:ms_lost
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Accepted Solution

by:
Venci75 earned 20 total points
ID: 6947354
public student (int a){}
public student (int b) {}

you can't have 2 methods (constructors) with same names and same types of parameters
0
 

Expert Comment

by:reynoldg
ID: 6947461
Venci75 is Right
0
 

Author Comment

by:ms_lost
ID: 6948940
thanks alot
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question