This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javafx.test; | |
public class Book { | |
private String title; | |
private String author; | |
private String genre; | |
private int numberOfPages; | |
private double rating; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javafx.test; | |
public class Main { | |
public static void main(String[] args) { | |
// create a book object using 5-arg constructor | |
Book myBook = new Book( | |
"1984", | |
"George Orwell", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javafx.test; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
scoopIceCream("chocolate", true); | |
scoopIceCream("vanilla", false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javafx.test; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
starWars(); | |
printSum(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javafx.test; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
starWars(); | |
printSum(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javafx.test; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
System.out.print("Enter a password to check if it's valid: "); | |
String str123 = scanner.nextLine(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javafx.test; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
System.out.print("Enter a word: "); | |
String word = scanner.nextLine().trim().toLowerCase(); | |
palindrome(word); | |
System.out.print("Enter a sentence: "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javafx.test; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
selectionSort(); | |
interest(); | |
randomNumbers(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Replace the package with whatever it says in your Intellij New project | |
//package com.javafx.test; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
reverseString(); | |
arrExample(); |