Which line is invalid code? 1. interface Abc3 2.{ 3. int a; 4. void funca(int); 5. string funcb(); 6.}

Options
- Line 1
- Line 3
- Line 4
- Line 5


CORRECT ANSWER : Line 3

Discussion Board
Line 3 and 4 are in error

Line 4 is also invalid as there is no identifier specified for the parameter.

Dre 10-30-2016 12:30 AM

interfaces can't have variables defined...

if you type this out line by line, everything is fine. The compiler wont let you define variables inside an interface

ken 01-20-2015 06:59 PM

Line 3

Technically Speaking the Error Lies Between Line 2 and 3 (You Cant Start any random code with a {. Since thers no Line 2 on Options the Answer is Line 3

Kamoi Reuben Moshesh 12-18-2014 04:12 AM

answer

interface cannot have data members

abhi 11-27-2013 12:34 AM

question

why line no 3 is error?????

Developer 10-5-2013 12:28 PM

why 3 line is incorrect

why 3 line is incorrect?

amit 09-11-2013 04:44 PM

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.)


Advertisement