473,508 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can not resolve symbol

1 New Member
hi all,
when i am trying to implement an interface,at compile time when i am trying to compile the implementation class i am getting an error like can not resolve the symbol.what may be the problem?please send it as soon as possible

ex:interface:

import java.rmi.*;
public interface MyRemote extends Remote
{
public int add(int i,int j)throws RemoteException;
public int sub(int i,int j)throws RemoteException;
}

implementation class:

import java.rmi.*;
import java.rmi.server.*;
public class MyImpl implements MyRemote
{
public MyImpl() throws RemoteException{
}
public int add(int i,int j)
{
System.out.println("In add method of MyImpl");
return(i+j);
}
public int sub(int i,int j)
{
System.out.println("In sub method of MyImpl");
return(i-j);
}
};
Aug 24 '07 #1
3 2200
r035198x
13,262 MVP
hi all,
when i am trying to implement an interface,at compile time when i am trying to compile the implementation class i am getting an error like can not resolve the symbol.what may be the problem?please send it as soon as possible

ex:interface:

import java.rmi.*;
public interface MyRemote extends Remote
{
public int add(int i,int j)throws RemoteException;
public int sub(int i,int j)throws RemoteException;
}

implementation class:

import java.rmi.*;
import java.rmi.server.*;
public class MyImpl implements MyRemote
{
public MyImpl() throws RemoteException{
}
public int add(int i,int j)
{
System.out.println("In add method of MyImpl");
return(i+j);
}
public int sub(int i,int j)
{
System.out.println("In sub method of MyImpl");
return(i-j);
}
};
1.) Use code tags when posting code
2.) What's the full error message you got?
Aug 24 '07 #2
madhoriya22
252 Contributor
hi all,
when i am trying to implement an interface,at compile time when i am trying to compile the implementation class i am getting an error like can not resolve the symbol.what may be the problem?please send it as soon as possible

ex:interface:

import java.rmi.*;
public interface MyRemote extends Remote
{
public int add(int i,int j)throws RemoteException;
public int sub(int i,int j)throws RemoteException;
}

implementation class:

import java.rmi.*;
import java.rmi.server.*;
public class MyImpl implements MyRemote
{
public MyImpl() throws RemoteException{
}
public int add(int i,int j)
{
System.out.println("In add method of MyImpl");
return(i+j);
}
public int sub(int i,int j)
{
System.out.println("In sub method of MyImpl");
return(i-j);
}
};
Hi,
Compiler will be definitely pointing to the line exactly where u r getting error. And It will also giving u the name of the symbol, which it is not able to resolve.....So go to that line and find that symbol.... Either u have mistype the symbol name or u haven't define that symbol at all.
Check it again... or send ur error.
Aug 24 '07 #3
Nepomuk
3,112 Recognized Expert Specialist
hi all,
when i am trying to implement an interface,at compile time when i am trying to compile the implementation class i am getting an error like can not resolve the symbol.what may be the problem?please send it as soon as possible
Hi mamathareddy! Welcome to TSDN!
I copied your classes and could not recreate the error - however, possibly my main method is different:
Expand|Select|Wrap|Line Numbers
  1. public static void main(String[] args) {
  2.     try
  3.     {
  4.         MyImpl impl = new MyImpl();
  5.         System.out.println("Add: " + impl.add(23, 42));
  6.         System.out.println("Sub: " + impl.sub(42, 23));
  7.     }
  8.     catch(Exception e)
  9.     {
  10.         System.err.println(e);
  11.     }
  12. }
  13.  
Normally ... cannot be resolved indicates, that you did something like
Expand|Select|Wrap|Line Numbers
  1. impl = new MyImpl();
  2.  
Without defining impl with MyImpl impl.
Aug 24 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
27755
by: Java script Dude | last post by:
I am investigating a solution to build all pages sent from my application servlet in UTF-8 encoding. From what I understand, I should be using HttpServletResponse.setCharacterEncoding("UTF-8"). The...
1
6383
by: yanwan | last post by:
I met this problem in executing a c++ project in visual studio. Does anyone have suggestions to resolve "error lnk 2001"? --------------------Configuration: reconstruction - Win32...
1
24787
by: Tony Johansson | last post by:
Hello! I get compile error when compiling using the command javac from the command terminal window(CMD). I have just two classes which are called HelloWorld.java and Slask.java. I have both...
2
7246
by: asanford | last post by:
We use StackWalk(StackWalk64) from dbghelp.dll to walk our callstacksas needed, using the various Sym* methods (SymGetSymFromAddr, SymGetLineFromAddr) to resolve source file, function name, and...
1
4610
by: vsp15584 | last post by:
Hii..i use the coding as below :- import java.applet.applet; import java.awt.*; import com.sun.j3d.utils.applet.mainframe; import com.sun.j3d.utils.universe.*; import...
3
2338
by: toish | last post by:
I have a program, aaa.java which creates an instance of another class(bbb.java). both java files are in a package entitled 'diss' bbb.java compiles sucessfully aaa.java throws a cannot resolve...
3
2350
by: adamrace | last post by:
Hi, i am fairly new to java and have been stuck on this for ages, basically i need to create a new object which gets a list of data from a text file, so i have this import java.io.*; ...
4
1855
by: momov4 | last post by:
I can't seem to resolve these errors. I have had people compile these codes on their computers with no problem, but I keep getting errors...can anyone help???? Here are the errors: cannot find...
11
2706
by: sunil | last post by:
Hi , Am facing one problem while deploying the shared library in different boxes. I devoloped one shared library for TAM suite ( This is a IBM product for different authentication mechanisms)...
3
3167
by: Sindhu Rani | last post by:
i hav created 3 classes in 3 different files. am gettin an error durin compilation. wat shud i do??? C:\s\source>javac -d ..\classes devtestdrive.java devtestdrive.java:5: cannot resolve symbol...
0
7118
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5049
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.