Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Csharp.NET
« Previous
Next »
Is there any error in the following code? If yes, identify the error.
EmployeeMgmt constructor: public int EmployeeMgmt() { emp_id = 100; }
Options
- Return type
- No errors
- Formal parameters
- Name
CORRECT ANSWER : Return type
Discussion Board
This question is wrong.
There are multiple errors.
- public must be lowercase
- there needs to be () after the constructor name but before the curly braces
- there cannot be a return type.
Matthew 04-26-2016 02:46 PM
Case sensitive!
"Public" must be lowercase! There are two errors in that line.
Andrew 06-22-2015 01:26 PM
.net
really i like this test for best perpration
akhilesh singh 02-24-2015 12:57 PM
EmployeeMgmt Constructor
constructor can not have return type
Satish Javiya 11-13-2014 05:36 AM
EmployeeMgmt Constructor
Answer is
Public EmployeeMgmt(){emp_id=100;}
Chandan Kumar Rath 12-23-2013 12:08 PM
« Previous
Next »
Write your comments
Enter the code shown above:
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
ASP.NET (41)
ASP.NET (16)
ASP.NET (16)
ASP.NET for Freshers (19)
ASP.NET for Experienced (19)
ASP.NET (20)
ASP.NET (20)
ASP.NET (25)
ASP.NET (20)
ASP.NET (20)
ASP.NET (20)
ASP.NET (20)
Dot.Net (100)
.NET Framework (26)
.NET Caching (7)
.NET Remoting and webservices (10)
.NET Security (11)
ADO.NET (10)
C#.NET (25)
VB.NET (33)
DOT.NET (10)
C#.NET freshers (20)
C#.NET freshers (20)
C#.NET experienced (20)
C#.NET (25)
C#.NET (20)
Sharepoint (20)
Sharepoint 2007 (15)
WCF (50)
WPF (45)
Advertisement
▲