Unit 1 Test Topics
3
Unit 1 Test Topics • Program headers – public class Name – public static void main(String[] args) • Scanner class – Import – Declare (Scanner in = new Scanner(System.in);) – Use in.nextLine(), in.nextInt(), in.nextDouble()
description
Unit 1 Test Topics. Program headers public class Name public static void main(String[] args ) Scanner class Import Declare (Scanner in = new Scanner( System.in );) Use in.nextLine (), in.nextInt (), in.nextDouble (). Doing math +,-,*,/,% Output print/ println - PowerPoint PPT Presentation
Transcript of Unit 1 Test Topics
Unit 1 Test Topics
• Program headers– public class Name– public static void main(String[] args)
• Scanner class– Import– Declare (Scanner in = new Scanner(System.in);)– Use in.nextLine(), in.nextInt(), in.nextDouble()
• Doing math– +,-,*,/,%
• Output– print/println– Escape sequences \t,\” etc.
• String methods– Like the string manips program
• Conversion– Binary to base 10– Base 10 to binary