How to connect Java Eclipse to MySQL Server?

JDBC connectivity to MySQL Server


1.Download MySQL JDBC Driver from

2.  After downloading the zip file, extract it and add this .rar file to lib folder of eclipse project.
  learn how to add .rar file to the eclipse folder by following the steps(1-5) from this post.

3.Make a class file and paste the following code.

import java.sql.*;
//import the all valuable stuffs frm SQL

public class driver {

public static void main(String[] args) {
// TODO Auto-generated method stub

//Get connection
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/new","root","root");
// here , new is the name of database that i created from MySQL Workbench, first root is my username of sql server and second root is my password. 
// make statement
Statement st=con.createStatement();
//execute sql query
ResultSet rs=st.executeQuery("select * from new_table");
// new_table is the name of my table that i have created from the MySQL Server Workbench.
//process result set
// name is the column name of my table.
}catch( Exception exc){


How to find the similarity between two words in java using wordnet? 

How to download and install MySQL server with Workbench?

Download and install MySQL server with MySQL Workbench

MySQL is an open-source relational database management system (RDBMS) which is the world's most popular open source database. With its proven performance, reliability, and ease-of-use, MySQL has become the leading database.

MySQL Workbench is a unified visual tool for database architects, developers, which  provides data modeling, SQL development. MySQL Workbench is a visual database design tool that integrates SQL development, administration, database design, creation and maintenance. MySQL Workbench is a visual database design tool recently released by MySQL AB. The tool is specifically for designing MySQL database.

Learn how to download and install these tool in a simple way.
  1. Go to and click on Downloads.

2. Click on the Community.

3.Click on the MySQL Community Server 

4. Click on the Go to downloaded page.

5. click on download.

Finally it will be downloaded to you computer. Afterward it is required to install it.

Follow the steps:

1. Double click on the executable file( the file you downloaded)

2. Click on the Add.. on the MySQL Server 5.7.18 and the green arrow.

4. click on MySQL Server 5.7.18 >> Next and execute.

5. After installing, it is required to configure it
Remain it as it is.

6. Enter root password and add user. click next on the screen having default value .


8. click on next remaining default value and execute and finally finish.
Now it has finally installed both Workbeck and MySQL Sever.
Find your workbench on your computer by typing "workbench" in the  window search box and start working.

Thanks and please share........

See also....
How to connect Java Eclipse to MySQL Server?

How to find the similarity between two words in java using wordnet? 

How to find the similarity between two words in java using wordnet?

WordNet is a lexical database of the english language.

Here is my prjoect to find the similarity between two word using WS4J in java using eclipse editor.

First of all download two jar files.
1. jawjaw-1.0.2.jar 
2. ws4j-1.0.1.jar     

Now you have to add these jar files into your java project as shown below:

Steps(1-6) for adding .rar file to the eclipse

1. create a folder by name "lib" in your project.

2. Now copy the two downloaded jar file and paste to this lib folder.

3. Right click on your project>> select build path>> configure build path.

4. click on the add jar

5. Select your project>> lib folder>> the two jar files.

6. Click OK.

7.Now move towards the coding part.
copy this code and paste to the class file

import edu.cmu.lti.lexical_db.ILexicalDatabase;
import edu.cmu.lti.lexical_db.NictWordNet;
import edu.cmu.lti.ws4j.RelatednessCalculator;
import edu.cmu.lti.ws4j.impl.HirstStOnge;
import edu.cmu.lti.ws4j.impl.JiangConrath;
import edu.cmu.lti.ws4j.impl.LeacockChodorow;
import edu.cmu.lti.ws4j.impl.Lesk;
import edu.cmu.lti.ws4j.impl.Lin;
import edu.cmu.lti.ws4j.impl.Path;
import edu.cmu.lti.ws4j.impl.Resnik;
import edu.cmu.lti.ws4j.impl.WuPalmer;
import edu.cmu.lti.ws4j.util.WS4JConfiguration;

public class Wordnet {

private static ILexicalDatabase db = new NictWordNet();
//available options of metrics
private static RelatednessCalculator[] rcs = { new HirstStOnge(db),
new LeacockChodorow(db), new Lesk(db), new WuPalmer(db),
new Resnik(db), new JiangConrath(db), new Lin(db), new Path(db) };
private static double compute(String word1, String word2) {
double s = new WuPalmer(db).calcRelatednessOfWords(word1, word2);
return s;

public static void main(String[] args) {
String[] words = {"add", "get", "filter", "remove", "check", "find", "collect", "create"};

for(int i=0; i<words.length-1; i++){
for(int j=i+1; j<words.length; j++){
double distance = compute(words[i], words[j]);
System.out.println(words[i] +" -  " +  words[j] + " = " + distance);


Please comment:

See also...How to connect Java Eclipse to MySQL Server?


   How to download and install MySQL server with Workbench?

What are the benefits of doing a PhD?

  • Many people comments on PhDians that that are mad. Believe me, It is true. and i have been experienced it. But they never confess it.
  • Actually you will be realized it after completion of one year or more of your PhD. The reason is that you will be totally embarked in your study.
  • What other say you, whether anyone abusing or praising whatever, you will will not be bothered. The thing is you will love your research work. You will be in your own world, having running experiments on your mind or any algorithms creating strategy.

There are many Benefits of doing a PhD.

  1. Independent.
  2. More career opportunities.
  3. Excitement
  4. Worth Knowledge
  5. Stipend
  6. PhD's know how to deal with boss.
  7. Never afraid of failure, they learn from it.
  8. They create information.
  9. Practical experience.
  10. Self Motivated.
  11. Stable career.
  12. Patience.

  • At present, i am a PhD student in my fourth year in Computer Science. So i am able to write this post. After these years, i learn to think independently and learn how to solve the problems with liberty. and have excitement for seeking something new on every day.
  • I make you sure that You will have lot of career opportunities after PhD as our Guides are witness, many companies will see you.
  • Moreover, you will get a monthly stipend ranging from Rupees 15000 to 35000 for you study and research work. For it, you don't have to do any job or any type of work.
  • Worth Knowledge: After a year embarking in PhD, you have enough knowledge in your concerning subject.
  • You can concentrate on other things also, as i love blogging and Gym.
  •  You will love your life rather than money.
  •  You will be on the internet. yeah, people will start find you on the google by typing your name.
  • Respect in the society.
  •  Away from the bad habit,Actually you would not have much time for it.
  • Foreign trips for the conferences.(free of cost)
  • If you are very diligent ,you can start your own company or an institute in your research field.

Correction Sentences English Grammar Exercises for the Bank / SSC

English is required in almost all the domains, whether it is in the research field, you are preparing for the competitive exams or you preparing for the IELTS etc;
Here we have provided with very and most used examples.
When i was also preparing for the competitive exam, i followed some English lectures in order to get maximum marks. And in this post i am sharing the the most important examples which will complete almost all the error corrections problems.
I hope, it will help you in covering the English syllabus.
Incorrect: You can get all the information that you want in this book.
Correct: You can get all the information you want in this book.
Incorrect: He has played neither cricket nor hockey.
Correct: He has neither played cricket nor hockey.
Incorrect: My work is superior to him.
Correct: My work is superior to his work.
Incorrect: I went there with a view to survey the entire procedure.
Correct: I went there with a view to surveying the entire procedure.
Incorrect: I am looking forward to talk to my parents.
Correct: I am looking forward to talking to my parents.
Incorrect: If i was an astronaut, i would have been very happy.
Correct: If i were an astronaut, i would have been very happy.
Incorrect: SRK is better than all the actors in the world.
Correct: SRK is better than all others actors in the world.
Incorrect: Computers give us an easier access to information.
Correct: Computers give us an easy access to information.
Incorrect:  None of the twins offered me tea.
Correct: Neither of the twins offered me tea. (neither is used for two and none for more than two.)

Incorrect:  One of the members expressed doubt if the minister was an atheist.
Correct:  One of the members expressed doubt whether the minister was an atheist.(whether used for two).
Incorrect: The cattles are grazing in the field.
Correct:   The cattle are grazing in the field.
Incorrect:  Have trust on God and everything will be right.
Correct:     Have trust in God and everything will be right.
Incorrect:  The Police of Delhi are lazy.
Correct:     The Police of Delhi is lazy.
Incorrect: One should be honest to his world.
Correct: One should be honest to one's world.
Incorrect: Despite of the great weather i was not able to go for a bike ride.
Correct: Despite  the great weather i was not able to go for a bike ride.('of' is not used with despite or we can use 'inspite of').
Incorrect:   As u know by my visiting card,i am now in Mumbai. by used for person.
Correct:      As u know from my visiting card,i am now in Mumbai. (by  used for person).
Incorrect: He asked me where was the marriage hall.
Correct: He asked me where the marriage hall was.
Incorrect:   The surrounding of the place made me very happy.
Correct: The surroundings of the place made me very happy.(surroundings used for noun and surrounding used for verb.)
Incorrect:   I am angry at my brother.
Correct: I am angry with my brother.(always use 'with' after angry)
Incorrect:  He  is the single doctor in our village.
Correct:       He is the only doctor in our village.
Incorrect: He was one of the greatest judges that has ever lived.
Correct: He was one of the greatest judges those has ever lived.(who/those for living and that for non living).
Incorrect: You are always doing this mistake.
Correct: You are always making this mistake.(make is used for mistake)
Incorrect: I didn't eat my breakfast.
Correct:    I didn't have my breakfast.(eat is used for meal or food.)
Incorrect: The Bible says that we should love each other.
Correct:    The Bible says that we should love one another.(one another is used for more than two people)
Incorrect: The building comprises of many ac rooms.
Correct:   The building comprises  many ac rooms.
Incorrect: She is the prettiest of two sisters.
Correct:    She is the prettier of two sisters.
Incorrect: The mangoes of India are sweeter than that of England.
Correct:   The mangoes of India are sweeter than those of England.
Incorrect: Who did you travel with?
Correct:   Whom did you travel with?
Incorrect: The road goes to Pakistan.
Correct:   The road goes leads to Pakistan.
Incorrect: She is the girl who everyone dislikes.
Correct:    she is the girl whom everyone dislikes.
Everyone and Everybody difference is shown below:
The teacher in a class would say, "Everyone, raise your hand." And, "Keeping the city clean is everybody's responsibility." Here, "everybody" is used to refer to the people in general; whereas "everyone" in the first sentence was used for the students present in the class.
The short story should not exceed more than 200 words.  (remove 'more than' when using exceed)

she told me that demand of(for) mock test is on the rise. use 'for' in place of 'of'
He was better than any other poets (poet). singular with 'any other'.
I didn't eat (have) the breakfast yesterday.
My house (home) is five times 'bigger'(as big as) 'than'(remove) your house. no degree with times. 
Because (remove) he is clever,so he gets good marks.
Ram as well as sham are (is) coming for the class.
'are' will come only  if there will be 'and' in between.
The meeting is between (from) 8 to 9.
between is used with 'and'.the sentence may be as The meeting is between 8 and 9.
Learn to use some prepositions:
I am standing at the corner of the street.
I am standing in the corner of the room. 
I am at work,home.
 I am at the airport.
I am in the Australia.
He is very kind to him.
My ideas are different than (from) yours.
Different followed by from. for is used with responsible.
She was angry on (with) me. 
I am pleased with her.
my father deals with (in) clothes.
Despite working hard, he still (remove still) failed.
Still is not used when there is despite or inspite of.
It is half past two on (by) my watch. 
He walked ten miles by(on) foot.
He came by car.
I am suffering from fever.
I am busy in (with) my phone.
busy with work.
He has great affection with (for is appropriate) his family.
on the tv, on time.
His son is more  intelligent than any (other) boy of the locality. it is comparative degree used for relate two person
Each of the these boys did not bring their (his) books.
singular used for each,every,,etc. any(either) of these two books will answer my purpose.either for two and any for many.
She is the best and (most )intelligent lady of the town. superlative degree used here ,so most is required.
you ,he and i(sequence) in the sentence.
'the' is not used with material,silver etc.but the is used when noun is particular.   
The iron of India is better than that of America  
One must do one's duty.
He sat under(in) the shade of a tree.
besides and beside difference: 
besides mean in addition to-besides it,i have another pen too  beside mean next to-ther was a small table table beside the bed.
Nine tenths of the pillar have rotten away.
Except he (him) ,all other have agreed to come back soon.use object after except and let.  
Supposing if (delete if or supposing) you get a seat in the plane,u will not take more than two hours to reach Mumba (cant use both suppose and if together)   .as' not come after 'consider'.
He as well as her sisters have (has) passed the exam.
when there is as well as between two subjects,the verb follows the first sub. 
Either he or his friends have committed this mistake.(no error).
when there is either or and neither nor,the verb follows the second subject.
no sooner and than combination.
hardly/scarcely and when.
although.though +yet.
It is a high time,you start (started) studying.
There is past tense use,when there is concept of time.
It is a time,you went  home.
you have given a (can use 'a' before news) wonderful news.
Both the machines are not functional.(both not used with negative,use neither)  
use 'to' with prior, prefer, interior, superior, inferior, superior, do not use than, than used for compare,older,elder,younger  .
Scarcely/hardly did (had)  she left the place then (when) the kids arrived .
He is not the kind of (a) person.
no article with sort of,type of etc.
I am good at English (use at with good).
by used with abide, ex: abide by
and use 'with' with comply ex, comply with and to with conform ex; conform to.
His younger son is working in abroad. no preposition before abroad. 
Use 'with' with fed up (highly annoyed).
i am not able to cope with this pressure (use with' with cope).  
Of all the friends, he is the most helpful and the less arrogant.
I have been free for the last forty years.
He is one of the best actors.
The lawyer told him that he would represent him only if he pay (paid) up his fee.
One of the drawbacks.he was acquitted of the charge.  
This watch is superior to and more expensive than that.  
He told me,....past.....   while i was travelling,a piece of luggage fell on my head.
Will the bank lend me money?
Incorrect: He informed the death of his mother to me.
Correct: He informed me about the death of his mother.
Fact: We inform somebody about something.
Incorrect: The groom has ordered for a wedding suit.
Correct: The groom has ordered a wedding suit.or
Correct: The groom has placed an order for a wedding suit.
Incorrect: You can speak free.
Correct: You can speak freely. Free means ‘without payment’. Freely means ‘without limit or restriction
Incorrect: She was boring in the class.       
Correct: She was bored in the class.
Incorrect: The police is coming.
Correct: The police are coming.
This post is written by Sunny Sharma, you can also contribute.


All about journals and research paper | What is impact factor? | how the impact factor is calculated? | who calculate the impact factor? Scopous journals

Figure 1: One of my Research Papers When the Scholars are in their Master or PhD or in any research field. They are supposed to writ...