Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > identifier expected error

Thread Tools

identifier expected error

manoj212077 manoj212077 is offline
Junior Member
Join Date: Sep 2009
Posts: 5
i have error in line no.4 and 5
in 4 ..variable final must be initialized
in 5.identifier expected
interface callback {
void callback(int parm);
int i;
i = 10;
class client implements callback,Fig {
public void callback(int p) {
System.out.println("callback called with"+p);
public void callback(int p,int q) {
System.out.println("callback called with"+(p+q));
void nonIface() {
System.out.println("classes that implents that also defined other method");
public void add(int a,int b){
interface Fig {
void add(int a,int b);
void callback(int parm);
class TestIface {
public static void main(String args[]) {
callback c = new client();
client d = new client();
c = d;
Fig f = new client();
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XSD Error: "Expecting '.', identifier or quoted identifier withmultiple tables. S_K ASP .Net 0 08-06-2008 09:22 PM
How can I fix the warning C4786 'identifier' : identifier wastruncated to 'number' characters in the debug information...? C++ 2 12-11-2007 08:17 PM
identifier not found error, undeclared identifier C++ 2 02-26-2007 02:11 AM
expected identifier error barry ASP .Net 6 12-25-2005 05:10 AM
Trying to declare identifier locally and hide a file scope identifier Kobu C Programming 7 02-25-2005 05:19 AM