Skip to content

Java.lang.Error in mkaing object Message and Time #11

@shashank-bgp

Description

@shashank-bgp

Dear All,
I wrote the following code and ended up with below mentioned error:**
Please suggest some solution.

import java.io.*;
import java.util.Collections;
import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Timer;

public class Bin_search
{
public static void main(String args[])
{
Bin_search b=new Bin_search();

	System.out.println("Enter the String");
	Scanner input=new Scanner(System.in);
	String msg=input.nextLine();
	System.out.println(msg);
	
	Message messageObject=new Message();
	Time timeObject=new Time();
	
	messageObject.simpleMessage(message);
    timeObject.getTime();
    
    System.out.println(msg + time);
}      

}

Error:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Message cannot be resolved to a type
Message cannot be resolved to a type
Time cannot be resolved to a type
Time cannot be resolved to a type
message cannot be resolved to a variable
time cannot be resolved to a variable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions