• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to implement interfaces

 
Divya Kotamraju
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I am new to java.I am trying to implement CharSequence interface and unable to figure where to start.So can someone please give me some guidelines..I am really confused.I could understand the concept of interface but I am unable to implement it.Can someone let me know where to start and how to start...I am really afraid I cant do programming..I am ending pretty much in the same way for every question I take to solve it. I am unable to program..I dont know whether I am getting the concepts wrong or what my problem is exactly..

Thank you !!
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Divya Kotamraju wrote:Hi everyone,

I am new to java.I am trying to implement CharSequence interface and unable to figure where to start.So can someone please give me some guidelines..I am really confused.I could understand the concept of interface but I am unable to implement it.Can someone let me know where to start and how to start...I am really afraid I cant do programming..I am ending pretty much in the same way for every question I take to solve it. I am unable to program..I dont know whether I am getting the concepts wrong or what my problem is exactly..

Thank you !!


Firstly you would want to understand when to implement an interface or why would you want to implement it? CharSequence - has already been implemented by lot other classes- String for example. So you can as well make use of String.

If you want to explore implementing Interfaces- The best place where they are used extensively (as far as I know) are while creating Swing applications.

You can always start implementing the code examples given in the book you are referring. That way it will help you understand the concepts. Always start from the simple program and build on it to actually get the final desired output from your program.

If you have implemented some code- Do post it here if you have any doubts related. Otherwise without code, it becomes difficult to actually help you out with any issues you would be facing.
 
Divya Kotamraju
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello mohamed sanaullah

Thank you for your quick reply. My basic problem is when I read the question I am not knowing how to proceed or where to start. Basically I am unable to code. I am enfing pretty much in the same way for every question I take. I am using online java tutorials for learning.I can read the whole concept and I can understand it but when it comes to implementation I cant even write few lines of code. I am using Eclipse IDE. Can you please help me out!!

Thank you!!
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would not recommend using an IDE for a beginner. Also get hold of the Java Documentation (a .chm file must be available). Now you need to go through some sample code to understand the style/approach for problem solving using Java. There are few examples in the CodeBarn which you can have a look at. They will help you to get started. So if you have any doubts- You can always search the forum for similar queries and if you dont find them, you can post the query on the forum. Also an useful link JavaBeginnersFaq.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic