Here's my code for that, consider it under the WTFPL (http://www.wtfpl.net/). Here is a pastebin of the code, as to avoid text formatting. (Link: https://pastebin.com/S3BDGxqm Raw: https://pastebin.com/raw/S3BDGxqm)
package javaapplication6;
import java.util.Scanner;
public class JavaApplication6 {
public static void main(String[] args) {
Scanner myScanner = new Scanner(System.in);
boolean a;
int s;
System.out.println("Enter an int");
s = myScanner.nextInt();
a = hasEight(s);
System.out.println(a);
}
private static boolean hasEight(int s)
{
String str = String.valueOf(s);
return str.contains("8");
}
}