I know it's very basic java but I am trying to learn. Can someone help me to understand my errors and what should I do to solve it?
package com.company;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int teamA = 0;
int teamB = 0;
//asks for the team selection
System.out.println("Would you like to be in Team A or Tema B? Write A for team A and B for team B");
Scanner input = new Scanner(System.in);
int result = input.nextInt();
public String scoreBoard() {
String displayScoreBoard = "No Score";
if (result.toString == "A" || result.toString == "a"){
teamA++;
displayScoreBoard = "Score of TeamX is" + teamA;
} else if (result.toString == "B" || result.toString == "b"){
teamB++;
displayScoreBoard = "Score of TeamY is" + teamB;
} System.out.println(displayScoreBoard.toString);
}
// write your code here
}
}