Lesson 3 of 34
Scanner తో Input చదవడం
8 min 20 XP
యూజర్ నుండి values ను Scanner తో చదువుతాం. ముందుగా పైన import java.util.Scanner; రాయండి. Run నొక్కే ముందు values ను Input box లో టైప్ చేయండి.
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.nextInt() పూర్ణ సంఖ్యను, nextDouble() దశాంశాన్ని, next() ఒక పదాన్ని (space వరకు), nextLine() మొత్తం లైన్ను చదువుతాయి. Spaces లేదా కొత్త లైన్లతో వేరైన values ఒక్కొక్కటిగా చదవబడతాయి.
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here."Sum = " + a + b అని రాస్తే 1230 ప్రింట్ అవుతుంది! సంఖ్యలు ముందుగా కూడబడేలా (a + b) ను brackets లో ఉంచండి.