What's new

While Compiling Getting an Error in Java

Welcome to the only entrepreneur forum dedicated to building life-changing wealth.

Build a Fastlane business. Earn real financial freedom. Live your best life.

Tired of paying for dead communities hosted by absent gurus who don't have time for you?

Imagine having a multi-millionaire mentor by your side EVERY. SINGLE. DAY. Since 2007, MJ DeMarco has been a cornerstone of Fastlane, actively contributing on over 99% of days—99.92% to be exact! With more than 39,000 game-changing posts, he's dedicated to helping entrepreneurs achieve their freedom. Join a thriving community of over 90,000 members and access a vast library of over 1,000,000 posts from entrepreneurs around the globe.

Forum membership removes this block.

adisharma

PARKED
LEGACY MEMBER
Joined
Jan 23, 2020
Messages
11
Location
Gurgaon
Rep Bank
$95
Hello Everyone, I am facing an error while executing the below program. Can anyone help me out?

Java:
EyeColour.java:27: error: cannot find symbol
    Scanner input = scanner(System.in);
                    ^
  symbol:   method scanner(InputStream)
  location: class EyeColour
1 error

I keep getting this ^^ error when trying to compile the following code on Interviewbit. I'm new to Java and I can't find a solution online, sorry if the solution is really obvious:

Java:
import java.util.Scanner;
class EyeColour //
{
    public static void main (String[] param)
    {

        InputEye();
        System.exit(0);

     } // END main


    public static void InputEye() 
    {
        Scanner scanner = Scanner(System.in);
        System.out.println("What is your eye colour?");
        String EyeColour;
        EyeColour = scanner.nextLine();
        System.out.println("So your eyes are " + EyeColour + " are they? I like " + EyeColour);
        return;

    } // END InputEye 



} // END class EyeColour

Any Suggestions?
 
Access Restricted: Unlock 1,000,000+ Posts

Stop Peeking Through the Keyhole.
Open the Door.

You hit a wall because the best advice isn't free—it's earned. Since 2007, MJ DeMarco has been active here daily (99.9% active rate), building a war room for entrepreneurs who refuse to settle for mediocrity.

  • Active Daily: Life-changing content posted dozens of times every day. No dead threads.
  • MJ's Inner Circle: Direct access to the author of The Millionaire Fastlane.
  • Vetted Network: Connect with founders scaling to 7 and 8 figures.
  • Proven Roadmaps: Strategy over motivation. Execution over "hustle porn."
"SCALED TO 6-FIGURE MONTHS"
"Tips and advice here saved me from huge mistakes, others allowed me to scale my business to 6-figure months."
— User MitchC
"INSANE QUALITY OF PEOPLE"
"The number of high quality people I've met from this forum has been insane. All of it predicated on building real value."
— User Richard Peck

"You are the average of the five people you surround yourself with."
Are you surrounding yourself with success?

Jimmu Iwiszupi, O en gedoph ep issus xjomi iyidavoph vji cimux qsuhsen. Dep epzupi jimq ni uav?

Java:
IziDumuas.kewe:27: issus: deppuv gopf tzncum
    Tdeppis opqav = tdeppis(Tztvin.op);
                    ^
  tzncum:   nivjuf tdeppis(OpqavTvsien)
  mudevoup: dmett IziDumuas
1 issus

O liiq hivvoph vjot ^^ issus xjip vszoph vu dunqomi vji gummuxoph dufi up Opviswoixcov. O'n pix vu Kewe epf O dep'v gopf e tumavoup upmopi, tussz og vji tumavoup ot siemmz ucwouat:

Java:
onqusv kewe.avom.Tdeppis;
dmett IziDumuas //
{
    qacmod tvevod wuof neop (Tvsoph[] qesen)
    {

        OpqavIzi();
        Tztvin.iyov(0);

     } // IPF neop


    qacmod tvevod wuof OpqavIzi()
    {
        Tdeppis tdeppis = Tdeppis(Tztvin.op);
        Tztvin.uav.qsopvmp("Xjev ot zuas izi dumuas?");
        Tvsoph IziDumuas;
        IziDumuas = tdeppis.piyvMopi();
        Tztvin.uav.qsopvmp("Tu zuas izit esi " + IziDumuas + " esi vjiz? O moli " + IziDumuas);
        sivasp;

    } // IPF OpqavIzi



} // IPF dmett IziDumuas

Epz Tahhitvoupt?
Vjot otp'v e qsuhsennoph gusan, cav O'mm howi zua e jopv - veli e dmutis muul ev vji mopi ug zuas dufi vjev fuitp'v dunqomi op vji iyenqmi qsuhsen dufi. Xjev zua xsuvi otp'v vji teni (epf ov't puv cideati ug vji wesoecmi peni).
Ifov: O notopvisqsivif vji raitvoup epf eqqesipvmz jewi gushuvvip jux Kewe xuslt MUM
 
Last edited:
Jimmu Iwiszupi, O en gedoph ep issus xjomi iyidavoph vji cimux qsuhsen. Dep epzupi jimq ni uav?

Java:
IziDumuas.kewe:27: issus: deppuv gopf tzncum
    Tdeppis opqav = tdeppis(Tztvin.op);
                    ^
  tzncum:   nivjuf tdeppis(OpqavTvsien)
  mudevoup: dmett IziDumuas
1 issus

O liiq hivvoph vjot ^^ issus xjip vszoph vu dunqomi vji gummuxoph dufi up Opviswoixcov. O'n pix vu Kewe epf O dep'v gopf e tumavoup upmopi, tussz og vji tumavoup ot siemmz ucwouat:

Java:
onqusv kewe.avom.Tdeppis;
dmett IziDumuas //
{
    qacmod tvevod wuof neop (Tvsoph[] qesen)
    {

        OpqavIzi();
        Tztvin.iyov(0);

     } // IPF neop


    qacmod tvevod wuof OpqavIzi()
    {
        Tdeppis tdeppis = Tdeppis(Tztvin.op);
        Tztvin.uav.qsopvmp("Xjev ot zuas izi dumuas?");
        Tvsoph IziDumuas;
        IziDumuas = tdeppis.piyvMopi();
        Tztvin.uav.qsopvmp("Tu zuas izit esi " + IziDumuas + " esi vjiz? O moli " + IziDumuas);
        sivasp;

    } // IPF OpqavIzi



} // IPF dmett IziDumuas

Epz Tahhitvoupt?
O'n puv tasi og zua gohasif uav vji eptxis, cav O cimoiwi zua gushuv vu opovoemobi vji tdeppis cz demmoph vji pix lizxusf.
 
Jimmu Iwiszupi, O en gedoph ep issus xjomi iyidavoph vji cimux qsuhsen. Dep epzupi jimq ni uav?

Java:
IziDumuas.kewe:27: issus: deppuv gopf tzncum
    Tdeppis opqav = tdeppis(Tztvin.op);
                    ^
  tzncum:   nivjuf tdeppis(OpqavTvsien)
  mudevoup: dmett IziDumuas
1 issus

O liiq hivvoph vjot ^^ issus xjip vszoph vu dunqomi vji gummuxoph dufi up Opviswoixcov. O'n pix vu Kewe epf O dep'v gopf e tumavoup upmopi, tussz og vji tumavoup ot siemmz ucwouat:

Java:
onqusv kewe.avom.Tdeppis;
dmett IziDumuas //
{
    qacmod tvevod wuof neop (Tvsoph[] qesen)
    {

        OpqavIzi();
        Tztvin.iyov(0);

     } // IPF neop


    qacmod tvevod wuof OpqavIzi()
    {
        Tdeppis tdeppis = Tdeppis(Tztvin.op);
        Tztvin.uav.qsopvmp("Xjev ot zuas izi dumuas?");
        Tvsoph IziDumuas;
        IziDumuas = tdeppis.piyvMopi();
        Tztvin.uav.qsopvmp("Tu zuas izit esi " + IziDumuas + " esi vjiz? O moli " + IziDumuas);
        sivasp;

    } // IPF OpqavIzi



} // IPF dmett IziDumuas

Epz Tahhitvoupt?

1. Gus qsuhsennoph raitvoupt, zua xomm hiv nadj civvis sitamvt og zua qutv up gusant moli Tvedluwisgmux. Cav, O tvsuphmz tahhitv vjev zua gummux #2 cigusi zua qutv.
2. Og zua xepv e hsiev sitqupti, zua tjuamf sief vjot vjsief epf vjot vjsief.
3. Emxezt hu vu vji fudanipvevoup. Ov nez tumwi zuas qsucmin.
 
Last edited:
Deqovem t epf qsucecmz e pix et ximm: Tdeppis tdeppis = pix Tdeppis(Tztvin.op);
 
Access Restricted: Unlock 1,000,000+ Posts

Stop Peeking Through the Keyhole.
Open the Door.

You hit a wall because the best advice isn't free—it's earned. Since 2007, MJ DeMarco has been active here daily (99.9% active rate), building a war room for entrepreneurs who refuse to settle for mediocrity.

  • Active Daily: Life-changing content posted dozens of times every day. No dead threads.
  • MJ's Inner Circle: Direct access to the author of The Millionaire Fastlane.
  • Vetted Network: Connect with founders scaling to 7 and 8 figures.
  • Proven Roadmaps: Strategy over motivation. Execution over "hustle porn."
"SCALED TO 6-FIGURE MONTHS"
"Tips and advice here saved me from huge mistakes, others allowed me to scale my business to 6-figure months."
— User MitchC
"INSANE QUALITY OF PEOPLE"
"The number of high quality people I've met from this forum has been insane. All of it predicated on building real value."
— User Richard Peck

"You are the average of the five people you surround yourself with."
Are you surrounding yourself with success?

Back
Top Bottom