# Cannot resolve symbol error with IntelliJ

**URL:** <https://club.ministryoftesting.com/t/cannot-resolve-symbol-error-with-intellij/35137>\
**Category:** Discussions\
**Tags:** java-intro\
**Created:** [26 February 2020 19:24 UTC](https://club.ministryoftesting.com/t/cannot-resolve-symbol-error-with-intellij/35137 "2020-02-26T19:24:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwinteringham](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/mwinteringham/32/9023_2.png) [@mwinteringham](https://club.ministryoftesting.com/u/mwinteringham)\
**Post date:** [26 February 2020 19:24 UTC](https://club.ministryoftesting.com/t/cannot-resolve-symbol-error-with-intellij/35137/1 "2020-02-26T19:24:04Z")

</div>

Hi folks,

It’s come to my attention that some learners have run into a small issue when building their own Java code as shown in the image below:

![symbol_error](https://us1.discourse-cdn.com/flex020/uploads/ministryoftesting/original/2X/b/bdfa6b2f91af90af6afa9d670001cfad1be0df39.png)

Notice how the code `num:` is red and returning an error 'Cannot resolve symbol ‘num’. This is because that `num:` code shouldn’t be there. All that’s required to pass to the `squareValue()` method is the number 2.

## So should I be adding it or not?

You may be asking ‘but I saw that code in the examples in the course’. Which is a fair point to make. The reason you are seeing that `num:` in the lesson video is because it’s not actually Java code, but the IDE Intellij trying to help by showing you what the name of the parameter is that you just assigned the number to.

In a nutshell, when the method was declared it had a parameter that had the name `num` so when the method was called later with the number 2, IntelliJ is showing you that that number 2 is assigned to the parameter `num`.

I hope that clarifies that issue. If you have any more questions about this please feel free to ask.

- Mark

---

<div class="post-metadata">

**Author:** ![jennf](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/jennf/32/6768_2.png) [@jennf](https://club.ministryoftesting.com/u/jennf)\
**Post date:** [26 February 2020 21:53 UTC](https://club.ministryoftesting.com/t/cannot-resolve-symbol-error-with-intellij/35137/2 "2020-02-26T21:53:02Z")

</div>

Thanks. That fixed my issue!

---

<div class="post-metadata">

**Author:** ![mike\_talks](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/mike_talks/32/11115_2.png) [@mike\_talks](https://club.ministryoftesting.com/u/mike_talks)\
**Post date:** [30 March 2020 03:05 UTC](https://club.ministryoftesting.com/t/cannot-resolve-symbol-error-with-intellij/35137/3 "2020-03-30T03:05:38Z")

</div>

Thanks Mark - wonder why I’ve not had any notification of this post (via email), I’d have been here sooner had I known! [Also been a helluva month hasn’t it?]
