JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

Code written for J7 should run ok on J17. There have only been very few changes in Java that create backwards compatibility problems. (Too few IMHO. It's a shame how great improvements like generics were handicapped by the constraints of remaining 100% compatible.)
It only takes a few minutes to download J17 and try it.

jwenting commented: not quite. A lot of functionality was removed in J11, like the entire XML handling. -4
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

Set is just an interface somewhere in the middle of the Collection hierarchy that includes various kinds of List and unordered Sets. and iteration/streaming operations thereon. Similarly the Map interface covers all kinds of key/value structures with search/lookup operations.
If you hit an issue trying to do lookups or searches it's 99% sure you should chose another class in Collection or Map that directly supports your requirement.

JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

== is a shallow comparison

Some spectacular Java nonsense here.

The == operator cannot be overloaded and checks for referential identity. If two variables contain the same reference then by definition they refer to the same object, not to two objects, so the nonsense about "shallow comparison" is not just wrong; it's meaningless.

The remarks about equals in Sets is also completely wrong. Sets use Objects.equals(a, b). If you bothered to check the API reference before posting you would have seen " equality is determined by using the equals method of the first argument."

DGPickett commented: Which is it where, Objects.equals or the equals of the first object or ==? +0
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

The name START is confusing.... it would be better named step, or increment or somesuch. (And all caps implies a constant in Java.)
And while we're at it... why is the Scanner called val? And what doesj mean to the reader?

Naming variables in a program isn't just about reducing typing - it's about making the meaning of the code obvious. Most of the confusion about this code would have been avoided by better naming.

Finally closing the Scanner inside the loop is horriby redundant. Once is enough.

JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

No, it would not be benificial at all. Cheating by using someone else's answers is an insult to the original author and an insult to your teacher.
Do your own homework.

JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

I don't think many people here use SWT; it's all Swing or JavaFX. If you don't get any answers soon you may have to look somewhere else. Sorry.

JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

After using String's split method (read the API doc) you have an ordinary array of Strings, which you can search with a for loop just like any other array

JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster

I had this problem a while back using AffineTransforms, and solved it like that. Eg if you want to rotate about the center of the object, move it so its center is at the center of rotation (normlly 0,0 of your coordinate system), rotarte it, then reverse the original translation to put the object back where it belongs.
With your figures that would be
translate -100, -100
rotate
translate 100, 100

But I'm no expert, and there's probably a better way that I don't know about.