// Install the Java helper library from twilio.com/docs/java/install
import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.twilio.twiml.Dial;
import com.twilio.twiml.Queue;
import com.twilio.twiml.TwiMLException;
import com.twilio.twiml.VoiceResponse;

public class Example extends HttpServlet {
  public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
    Queue queue = new Queue.Builder("Queue Demo").build();
    Dial dial = new Dial.Builder().queue(queue).build();

    VoiceResponse twiml = new VoiceResponse.Builder().dial(dial).build();

    response.setContentType("application/xml");

    try {
      response.getWriter().print(twiml.toXml());
    } catch (TwiMLException e) {
      e.printStackTrace();
    }
  }
}

@@ -252,39 +252,11 @@
 iml.
-Dial;%0Aimport com.twilio.twiml.Q
+Enq
 ueue
@@ -485,22 +485,26 @@
 n %7B%0A    
-Q
+Enq
 ueue 
+en
 queue = 
@@ -507,17 +507,19 @@
 e = new 
-Q
+Enq
 ueue.Bui
@@ -523,16 +523,28 @@
 Builder(
+).queueName(
 %22Queue D
@@ -551,65 +551,8 @@
 emo%22
-).build();%0A    Dial dial = new Dial.Builder().queue(queue
 ).bu
@@ -554,25 +554,24 @@
 %22).build();%0A
-%0A
     VoiceRes
@@ -616,17 +616,23 @@
 r().
-dial(dial
+enqueue(enqueue
 ).bu

Fix Enqueue example Java 7