Just’ and ‘only’ are adverbs that point to or emphasise one part of the clause. In the example , the same meaning is implied in both sentences:
I came just to speak with you for a couple of minutes.
I came only to speak with you for a couple of minutes.
But I’d like to point out that your sentences sound very formal and literary. On the one hand, ‘just’ and ‘only’ can ‘float around’ in a sentence and take more than one position. But on the other, the normal position in spoken English is between the subject and verb. They sound much better like this:
I just came to speak with you for a couple of minutes.
I only came to speak with you for a couple of minutes.
In many cases you’ll come across in spoken English, ‘just’ is used as a softener. I’d better give you an example to explain what I mean by ‘softener’:
Can I just ask you a question?
- what I’m saying here is ‘I want to ask you a question but I don’t want to inconvenience you and it’ll only take a short time’, whereas directly saying ‘Can I ask you a question?’ doesn’t have this tone.
So, we often use ‘just’ to add a polite tone, the word doesn’t specifically carry much meaning in itself.
There are other situations when we use ‘just’ but we can’t use ‘only’ in its place, for example, if I say ‘he was just here’, I’m trying to tell you he was here a few minutes ago.
So although I’ve told you about some differences, there are lots of times when they are synonymous. Basically, anytime you can use ‘only’, you can usually use ‘just’ to mean the same thing. But you’ve got to remember that the range of uses and meanings for ‘just’ are quite wide.
Follow this link to do an activity about Just and Only.