Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


shivashankar g
urjent code needed
1 Answer(s)      4 years and 8 months ago
Posted in : Java Interview Questions


Coding:

- We have Document domain/entity object with properties of Long id, String fileName, String filePath, int docId.
Please write a java code that will:
1. Implements hashCode() and equals() for this object
2. Write method to search that Document object in List.

Doc(1, test.pdf, "c:\temp\test.pdf", 1234);
Doc(1, test.pdf, "c:\temp\test.pdf", 2222);
Doc(1, test.pdf, "c:\temp\test.pdf", 3333);

Document findDocument(int docId){
// your code is here
}


Document findDocument(Document doc){

//your code is here

}

Advertisement
View Answers

May 13, 2010 at 11:20 AM


Hi Friend,

Please clarify your problem.

Thanks


Related Tutorials/Questions & Answers:
urjent code needed - Java Interview Questions
urjent code needed  Coding: - We have Document domain/entity.... Please write a java code that will: 1. Implements hashCode() and equals...){ // your code is here } Document findDocument(Document doc
Code Help Needed
Code Help Needed  I am trying to help a buddy of mine with this program and I can't seem to figure it out. I am still working on it but any help would be appreciated. The program is suppose to write to and read from a file
Advertisements
MySQL take backup of a table - example code needed
MySQL take backup of a table - example code needed  How to take backup of a table in MySQL? I have a database which contains many tables. What is the command to take the backup of one table with data from database? Thanks
Needed jsp codes
Needed jsp codes   jsp code for employee payroll.producing a payslip of every employees monthly calculating the gross pay of a particular employee considering the income tax and producing a report which can be printed out
Packages needed for JDBC in Linux
Packages needed for JDBC in Linux  Can anyone tell me the packages needed to run a program with JDBC in Red Hat 5
Help needed in JSP
Help needed in JSP  Hi .. I want to Update the multiple values of database using checkboxes and want to set the session for selected checkboxes..? please answer if any one knows as soon as possible
help Needed with requirements
help Needed with requirements  Following are my requirements : * Maintain a student database *Based on a student's test results ,reports should be generated so as to project details such as a students weakness in a particular
A program solution needed
A program solution needed   I need a solve for this problem please ! a program that displays grade statistics. The program should read any number of grades (up to 100) and ends when the user enters -1, the program should reject
Java help needed
as needed by the number of characters of the chosen word. 2. Add 4 buttons or menu.... 3. In the correct event handler, write program code to check if the entered
help needed for a program - Java Beginners
help needed for a program   i am having trouble understanding on what to code, so can some 1 help me out here. thanks in advance. Part I Write, compile and execute a Java program that displays the following prompts
urgent help needed!!!!
comboboxes for storing in database  how to access values selected from connected comboboxes for storing in database...i'm attatching a code i got...(Exception e){ System.out.println(e); } %> For the above code, we have
urgent help needed!!!!
attatching a code i got from net for connected comboboxes...from this how could i...; For the above code, we have created two database tables: CREATE TABLE `country
Needed modifications to ApplicationContext if extending this application
Needed modifications to ApplicationContext if extending this application   I followed the Developing Struts Hibernate and Spring Based Login/Registration Application tutorial and that is very good. Now I need to modify
Needed modifications to ApplicationContext if extending this application
Needed modifications to ApplicationContext if extending this application   I followed the Developing Struts Hibernate and Spring Based Login/Registration Application tutorial and that is very good. Now I need to modify
PHP help needed - Development process
PHP help needed  This is my code that I am using for search engine, can any body answer how to cheange the code if I want limited and per page result display??? code Career Search result Yami says <?php
further clarification needed - Java Beginners
further clarification needed  Dear Experts, I refer to the last answer you have written to me. The good news is that there's no error already but the code is still not working for me. As Tsuch, I hope to clarify about
servlet redirect problem help needed
out and also execute the last portion of the code...and giving error i thought... of the code will not be executed if any any one knows plz tell me what happens
servlet redirect problem help needed
out and also execute the last portion of the code...and giving error i thought... of the code will not be executed if any any one knows plz tell me what happens
what programs are needed in java programming? - Java Beginners
what programs are needed in java programming?  What programs are needed in java programming?   Hi friend, For solving the problem visit to : http://www.roseindia.net/java/] Thanks  Hi friend
Help needed for J2me and PHP - Development process
Help needed for J2me and PHP  Hello Sir I am a degree student. I have a small CRM application using J2me and PHP. I want to do cryptography using bouncy castle and decrypt the same in php with mcrypt extension. I did try
urgent help needed in JDBC AND JAVA GUI - JDBC
urgent help needed in JDBC AND JAVA GUI  my application allows... want any one to help me convert from scanner to java GUI for this code, and connect it to mysql database thanks the code is //1st class for creating
Help needed for Form Validation please help!
Help needed for Form Validation please help!  I have created a page... clicking the submit button for sign up it also goes through the jsp code and returns incorrect Username/password combination. So how can I make the jsp code confined
Further advice needed on my last question - JSP-Servlet
Further advice needed on my last question  Dear Experts, I refer... code. You haven't close scriptlet tag and braces in few places therefore error occurs.Here is your code: Enter ID: Parents NRIC
Help needed on java standalone app and default browser interaction.
Help needed on java standalone app and default browser interaction.  Hi Developers and tutors, Is anyone able to guide on how am i able to extract the url thats displaying on my default browser to my java standalone application
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP   The Task Write a class whose objects will represent students. The class should have three fields for representing a student‚??s
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP
CAN ANYONE SOLVE THIS FOR ME. URGENT HELP NEEDED. PLEASE HELP   Write a class whose objects will represent students.The class should have three fields for representing a student√Ę‚?¨‚?Ęs name, this student√Ę‚?¨‚?Ęs
jsf center tag needed - Java Server Faces Questions
, Code to solve the Problem : Thanks
code
code  code for android sample program
code
code    how to write this in java
Code
Code  code for connecting c lang to database
code for this is
code for this is  a b c d c b a a b c c b a a b b a a a code
Advertisements
 

 

 

DMCA.com