Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!
<img> tag? So I'm assuming what you mean is that you want to display an image that is hosted on another website. In order to do this, you can edit the img src to something like https://codeforum.org/styles/uix_pro/images/logo.png.<img src="https://codeforum.org/styles/uix_pro/images/logo.png">
.I believe that something like this could be achieved using an OOP(Object-Oriented-Programming) language such as PHP, Python, Ruby, or Java.Orenthal said:Okay For example on amazon when ordering an item you can choice the quantity, colour and style if I was to select this how could I get that same information displayed on a completely separate page, automatically?
public class DataExample {
public static void main(String args[]) {
/*
* Note that these are just values that I've assigned for this example.
* Your own code may or may not have the ability for the user to assign their own
* values(If getting input is what your program will be doing).
*/
Item Item1 = new Item("Chair", "Brown", 1);
System.out.println("Item Name: " + Item1.ReturnItemName());
System.out.println("Item Colour: " + Item1.ReturnItemColour());
System.out.println("Quantity: " + Item1.ReturnQuantity());
}
}
class Item {
// Instance-Fields
private String ItemName;
private String ItemColour;
private int Quantity;
// Constructor
public Item(String IName, String IColour, int Quantity) {
ItemName = IName;
ItemColour = IColour;
this.Quantity = Quantity;
/*
* ^^^ Note that "this.Quantity" refers to the instance-fields part of the class. Not the
* "Quality" declared in the constructor parameters.
*/
}
public String GetItemName() {
//...
return ItemName;
}
public String GetItemColour() {
//...
return ItemColour;
}
public int GetQuantity() {
//...
return Quantity;
}
public String ReturnItemName() {
return ItemName;
}
public String ReturnItemColour() {
return ItemColour;
}
public int ReturnQuantity() {
return Quantity;
}
}
Code Forum is a community platform where coding enthusiasts can connect with other developers, engage in discussions, ask for help, and share their knowledge with a supportive community. It's a perfect place to improve your coding skills and to find a community of like-minded individuals who share your passion for coding.
We use essential cookies to make this site work, and optional cookies to enhance your experience.