Answer:
Following are the program to this question:
import java.util.*;//import package for user input
public class Main//defining main class
{
public static String Cat (String name, String gender, int age)//defining string method Cat that accept parameter value
{
return name + ';' + gender + ';' + age;//return parameter value
}
public static void main(String[] args) //defining main method
{
String name,gender;//defining String variable
int age;//defining integer variable
System.out.println("Enter name, gender and age: ");//print message
Scanner obx=new Scanner(System.in);//creating Scanner class object for user input
name=obx.next();//input name value
gender=obx.next();//input gender value
age=obx.nextInt();// input age value
System.out.println(Cat(name,gender,age));//print return method value
}
}
Output:
Enter name, gender and age:
dani
Female
12
dani;Female;12
Explanation:
In the above-given code, a string method Cat is declared, that accepts three variable "name, gender, and age", inside the method return keyword is used that returns the parameter values.
In the main method, the above parameter variable is declared, which is used to input value from the user-end, and used the print method to print its return value.
What are url addresses for visiting websites? And what are the different parts of a URL? Answer it in a 1-2 paragraph
Answer:
Please read explanation
Explanation:
URL is the short form for "Uniform Resource Locator". A uniform resource locator tells the location of a website to the browser.
Parts of URL:
There are three main parts of URL
ProtocolDomain nameExtensionProtocol defines the type of protocol used for communicating with the website while the domain name is the name assigned to the IP address and the mapping is stored in domain name server and extension tells the type of website i.e.
.com means commercial
.org means non-profitable organization
.edu means educational website
An additional element is path which change with the website navigation.