greatest username code ever

//skooklar, 2017 import java.util.*; import java.io.*; import java.net.*; public class Username { int lastNum; public static void main(String[] args) { int index; String meme; Scanner in = new Scanner(System.in); String first; System.out.println("Insert your first name"); first = in.nextLine(); index = first.indexOf(" "); String middle; System.out.println("Insert your middle name"); middle = in.nextLine(); String last; System.out.println("Insert your last name"); last = in.nextLine(); int lastNum=last.length(); String grad; System.out.println("Insert your graduation year"); grad = in.nextLine(); if(last.length()>4) System.out.println((last.substring(0,4))+(first.substring(0,1))+(middle.substring(0,1))+(grad.substring(2,4))); if(last.length()<4) System.out.println((last.substring(0,lastNum))+(first.substring(0,1))+(middle.substring(0,1))+(grad.substring(2,4))); try{ URL epis = new URL("https://portals.veracross.com/ea"); System.out.println("Great, now use that username and password to login to the Episcopal network at this host: " + epis.getHost()); }catch(Exception e){System.out.println(e);} } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.