/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package spr17jan24; import java.util.Scanner; /** * * @author jcmtiernan */ public class Spr17Jan24 { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner input = new Scanner(System.in); int classNumber = 20; double classNum2; classNum2 = 1.5; /* System.out.println("The class's first number is: " +classNumber +" and 2nd is " +classNum2); System.out.println(); System.out.println("Please enter an integer: "); //classNum2=12+5; classNumber = input.nextInt(); System.out.println("The user's number is: " +classNumber); Quiz #2 -- write the Java statements needed to read a Double value into the variable classNum2. This includes declaring a Scanner object. */ //Scanner inValues = new Scanner(System.in); //classNum2 = inValues.nextDouble(); String hnbc = "How Now Brown Cow?"; String hn; String bc; hn = hnbc.substring(10,13); hn = hn.toUpperCase(); System.out.println("Substring at index of 10 of "+hnbc+" is *"+hn+"*"); } }