Word Separator and Pig Latin Program Final Edit
Your commenting is absolutely abusive. This one is particularly beautiful... in its own way:
//Close keyboard
keyboard.close();

None of these comments are useful, because:

They state the obvious. Let the code speak for itself!
They tell the reader what the code is doing, but not why it's doing it.
They are a distraction. Reader/maintainer reads the comment, and then the code, and then subconsciously validates whether the comment reflects what the code underneath is saying.

See this beautiful answer specifically about comments - two things to remember:


Comments are supposed to make plain what the code does not tell us already.

Good code seldom needs comments




The naming is also inconsistent:
StringBuilder str = new StringBuilder(sentence); 

String str = tokens[i]; 

A better name for the former could be builder, and a meaningful name for the latter could be token.
Comments should not replace meaningful names:
// Get first letter from string
String str1 = str.substring(0, 1); 

If str1 were firstLetter...