i have two numbers...

1564656
1981676
i want to check if the first and the last number from a string of these numbers are the same or not...how would i do that. how would i just compare the first and a last number and ignore the other numbers in this string?

my code so far...

class lotto
{
public static void main(String[] args)
{
JOptionPane.showMessageDialog (null, " LOTTOMAX - PLAY - WIN");
String numgen =JOptionPane.showInputDialog (null, " ENTER 7 DIGIT NUMBER:" );
int playa1 = Integer.parseInt(numgen);
JOptionPane.showMessageDialog (null, playa1);
int LottoRandom = (int)(Math.random()*10000000);
JOptionPane.showMessageDialog (null, LottoRandom);
if (playa1 >10000000 )
{
JOptionPane.showMessageDialog (null, " INVALID NUMBER. ");
}

Similar Questions
    1. answers icon 2 answers
  1. Solve Inequalities Quick Check1 of 51 of 5 Items Question In which of the given sets of numbers are all the numbers solutions of
    1. answers icon 1 answer
  2. Compare Very Large and Very Small Numbers Quick Check4 of 54 of 5 Items Question Which set of numbers is arranged in descending
    1. answers icon 1 answer
  3. QuestionThe Venn diagram represents the relationship among whole numbers, rational numbers, irrational numbers, natural numbers,
    1. answers icon 1 answer
more similar questions