Skip to content

CoderSales/AI-java-Chat-and-Copilot-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-java-Chat-and-Copilot-test

AI-java-Chat-and-Copilot-test

Copied code from ChatGPT3.5

public class PrimeChecker {
    private int number;

    public PrimeChecker(int number) {
        this.number = number;
    }

    public boolean isPrime() {
        if (number <= 1) {
            return false;
        }
        for (int i = 2; i <= Math.sqrt(number); i++) {
            if (number % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        int numToCheck = 17;  // Replace with the number you want to check
        PrimeChecker primeChecker = new PrimeChecker(numToCheck);

        if (primeChecker.isPrime()) {
            System.out.println(numToCheck + " is prime.");
        } else {
            System.out.println(numToCheck + " is not prime.");
        }
    }
}

time update

04:10 remaining

after running PrimeChecker.java

begin revision at 03:15 remaining

note ahead of time

during code generation time

time saved using Chat and GitHub CoPilot

installed

GitHub Copilot and simultaneous auto install of GitHub Copilot Chat

done by 01:20 remaining

revision at 00:50 remaining

    this.number = number;

PrimeChecker primeChecker = new PrimeChecker(numToCheck);

+ 2 minutes at 23:49 hours

so end at 23:47 hours

so start at 23:32 hours

Releases

No releases published

Packages

No packages published

Languages