What is the output of the following code? public class Count…

What is the output of the following code? public class Counter {private int value; public Counter() {    value = 0;}public void increment() {    value = value + 1;}public int getValue() {    return value;}}public class Main {public static void main(String[] args) {Counter c = new Counter();c.increment();c.increment();System.out.println(c.getValue());}}

Write a complete Java class named BankAccount that: • Has on…

Write a complete Java class named BankAccount that: • Has one private double field: balance • Includes a default constructor that initializes balance to 0.0 • Includes two overloaded deposit methods: o One that takes a double parameter named amount and adds it to the balanceo One that takes a String parameter,converts it to a double, and adds it to the balance • Includes a method getBalance() that returns the current balance