added screenshots and java code