Console.WriteLine("Hello World");
Conditinals are what are used to make a string work.
public interface Queue<E> extends Collection<E> {
List: If you just want a list and don't care about any duplicates, i.e list of people, shopping list, list of things to do in life.
Queues: If you want to simulate a queue for example, in a hospital you have a queue and also priority queue (in emergency departments). The triage would determine who is in critical condition and needs to be treated.
Another example is a shopping queue, first person in line is 'usually' the first one to checkout.
Stacks: Used in your internal memory to push and pop values as you pass them to functions/methods.
Another interesting use is, in video game inventory method, where you can pick up an item (push) onto the stack, and drop an item (pop) off the stack.
Hash/Dictionary: These are usually seen used in database, for look up and index.
Depending on what you want to simulate, I do agree with the others, it's handy to read up on data-structures. A book helps but the internet also has a wealth of information.
xmlList.Add( "image" , "images/piece1.png" );
xmlList.Add( "description" , " Experience why entertainment is more amazing with Xbox." );
xmlList.Add( "title" , "Downloads" );
xmlList.Add( "image" , "images/piece2.png" );
xmlList.Add( "description" , "Limited-time offer: Buy Office now, get the next version free.*" );
xmlList.Add( "title" , "Security & Updates" );
public class CalendarEntry
public $var1 = 'hello ' . 'world';
public $var4 = self::myStaticMethod();
Public ThisField As Integer
' Field used for Property Set operations.
Private thisPropertyValue As Integer = 0
Public Property ThisProperty() As Integer
Set(ByVal Value As Integer)
' Only allow Set operation for values less than 10.
If Value < 10 Then thisPropertyValue = Value
class point (x_init,y_init) =
method moveto (a,b) = x <- a ; y <- b
method rmoveto (dx,dy) = x <- x + dx ; y <- y + dy
"( " ^ (string_of_int x) ^ ", " ^ (string_of_int y) ^")"
method distance () = sqrt (float(x*x + y*y))
public string Name { get; set; }
public boolean HasPets { get; set; }
public void Foo(Person person)
if (person.Name == null) {
throw new Exception("Name of person is null.");
Console.WriteLine("Name is: " + person.Name);
void setLength( double len );
double getLength( void );
cout << "Object is being created" << endl;
void Line::setLength( double len )
public virtual void show()
Console.WriteLine("Hello: Base Class!");
protected void Pedal() { }
protected internal int Wheels
public EnumTest(Day day) {
public void tellItLikeItIs() {
System.out.println("Mondays are bad.");
System.out.println("Fridays are better.");
case SATURDAY: case SUNDAY:
System.out.println("Weekends are best.");
System.out.println("Midweek days are so-so.");
protected string ssn = "444-55-6666";
protected string name = "John L. Malgraine";
public virtual void GetInfo()
Console.WriteLine("Name: {0}", name);
Console.WriteLine("SSN: {0}", ssn);
public string id = "ABC567EFG";
public override void GetInfo()
Console.WriteLine("Employee ID: {0}", id);
Employee E = new Employee();