title: Create instance of a class and set variables
body: <p>in C# you can create a instance of a class and set the values of variables at the same time:</p>
  
  <pre><code>public class Object
  {
      public virtual long Id { get; set; }
      public string Name { get; set; }
      public string Description { get; set; }
      public int Version { get; set; }
      public long ParentId { get; set; }
  }
  
  public class Start
  { 
       Object object= new Object()
       {
           Id = 1,
           Name = name,
           ParentId = parentId,
           Description = null,
           Version= 2
       };
  }
  </code></pre>
  
  <p>Is this possible in Java aswell and how?</p>