
)Create a class called College with a method displayDetails which should print "IIT Mumbai" in console.
Inside the main method instantiate the College class and invoke the method.

hi dhivya, Here I am giving an example of your problem.
public class College
{
String str = "IIT Mumbai";
public void displayDetails()
{
System.out.println(str);
}
public static void main(String args[])
{
College college = new College();
college.displayDetails();
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.