Friday, June 2, 2017

LICT assessment test exam question and answer

Hello friend today  i show you some sample question of  LICT assestment text exam.


1. Which statement is true about web container session management?

A. Access to session-scoped attributes is guaranteed to be thread-safe by the web container.
B. To activate URL rewriting, the developer must use the HttpServletResponse.setURLRewriting method.
C. If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client.
D. The JSESSIONID cookie is stored permanently on the client so that a user may return to the web application and the web container will rejoin that session.

Answer :C. If the web application uses HTTPS, then the web container may use the data on the HTTPS request stream to identify the client. 



 2. What is the output if the main () method is run?
public class Starter extends Thread {
private int x = 2;
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
new Starter().makeItSo();
}
public Starter(){
x=5;
start();
}
public void makeItSo() throws Exception{
join();
x=x-1;
System.out.println(x);
}
public void run(){
x = 5;
} }
 


Answer: 4.0


 3. Which EL expression evaluates to the request URI? 

A. ${requestURI}
 B. ${request.URI} 
C. ${request.getURI} 
D. ${request.requestU

 Answer:C. ${request.getURI}


 4. A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where the old one is installed. Bob is currently able to run a Java chess program starting from his home directory /home/bob using the command: java -classpath /test:/home/bob/downloads/*.jar games.Chess Bob’s CLASSPATH is set (at login time) to: /usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jar What is a possible location for the Chess.class file?
A. /test/Chess.class
B. /home/bob/Chess.class
C. /test/games/Chess.class
D. User/lib/games/Chess.class
Answer : C. /test/games/Chess.class 



5. What will be the result of attempting to compile and run the following code?

public class Q6b0c{
public static void main(String[] args){
int i =4;
float f = 4.3F;
double d = 1.8;
int c = 0;
if((i==f))c++;
if ((int)(f+d) == ((int)f + (int)d))c+=2;
System.out.print(c);
}
}
A. The code will fail to compile.
B. The value 0 will be written to the standard output.
C. The value 1 will be written to the standard output.
D. The value 1 will be written to the standard output.

Answer: B. The value 0 will be written to the standard output.

6. What will be the result of attempting to compile and run the following program?
public class MyClass extends Thread{
public MyClass(String s){
msg = s;
}
String msg; public void run(){
System.out.println(msg);
}
public static void main(String[] args) throws Exception{
new MyClass("Hello");
new MyClass("World");
}
}
A. The program will fail to compile.
B. The program will compile without errors and will print Hello and World.
C. The program will compile without errors and will print a never-ending stream of Hello and World.
D. The program will compile without errors and will simply terminate without any output when run.

Answer: D. The program will compile without errors and will simply terminate without any output when run.

7. Which path is required to be present within a WAR file?
A. /WEB-INF/classes
 B. /classes
C. /index.html
D. /WEB-INF/web.xml
Answer: D. /WEB-INF/web.xml

8. Consider the following class declaration:
public class MyList{
private int size;
public abstract void add(Object o);
}
A. It will compile successfully
B. The compiler will fail at line one
C. The compiler will fail at line Two
D. The compiler will fail at line Three

Answer:D. The compiler will fail at line Three

9. A web application uses the HttpSession mechanism to determine if a user is "logged in." When a user supplies a valid user name and password, an HttpSession is created for that user.The user has access to the application for only 15 minutes after logging in. The code must determine how long the user has been logged in, and if this time is greater than 15 minutes, must destroy the HttpSession.
Which method in HttpSession is used to accomplish this?

A. getCreationTime
B. invalidateAfter
C. getLastAccessedTime
D. getMaxInactiveInterval



Answer:A. getCreationTime

10. package geometry;

public class Hypotenuse {
public InnerTriangle it = new InnerTriangle();
class InnerTriangle {
public int base;
public int height;
}
} Which statement is true about the class of an object that can reference the variable base?
 A. It can be any class.
 B. No class has access to base.
C. The class must belong to the geometry package.
 D. The class must be a subclass of the class Hypotenuse.

Answer:C. The class must belong to the geometry package.

11. What will the program print when it is compiled and run?

public class RQ400_100 {
public static void main(String[] args){
int sum = 0;
for(int i:makeCollection()){
sum +=i; System.out.println(sum);
}
static Collection<Integer> makeCollection(){ System.out.println("A collection coming up");
Collection<Integer> collection = new ArrayList<Integer>();
collection.add(10);
collection.add(20);
collection.add(30);
return collection;
}
}
}
A. A collection coming up. 60
B. A collection coming up. A collection coming up. A collection coming up.60
C. The program does not compile.
D. None of the above

12. public class Appendage {
private static void putO(StringBuilder s1){
s1 = s1.append("0");
}
public static void main(String[] args) {
// TODO Auto-generated method stub
StringBuilder s1 = new StringBuilder("W");
putO(s1);
s1.append("W!");
System.out.println(s1);
}
}
A. The program will print WW!
B. The program will print WOW!
C. The program will compile. But throw exception at runtime
D. The program will fail to compile

13. When comparing java.io.BufferedWriter and java.io.FileWriter, which capability exist as a method in only one of two ?
  A. closing the stream
B. writting to the stream
C. making a location in the stream
 D. writting a line separator to the stream

14. What will the following program print when run?
public class MoreCharSeq {
public static void main(String[] args){
String s1 = "WOW";
StringBuilder s2 = new StringBuilder(s1);
String s3 = new String(s2);
System.out.println((s1.hashCode()==s2.hashCode())+" "+(s1.hashCode() == s3.hashCode()));
} }
A. The program will print false true
B. The program will print false false C. The program will print true false D. The program will print true true 15. 16. A programmer has an algorithm that requires a java.util.List that provides an efficient implementation of add(0, object), but does NOT need to support quick random access. What supports these requirements? A. java.util.Queue B. java.util.ArrayList C. java.util.LinearList D. java.util.LinkedList
17. what describes analysis
18. Instructions: Please use the jumbled word given bellow to form correct question or statement: Way will we a find task this to do
Ans: we will find a way to do this task.
19. I t's very kind of you to ...... to speak at the meeting.
A. Accept
B. Agree
C. Comply
D. Concur
20. The dancer tried to ______ the movements of his teacher, exactly copying every graceful step.
A. Plagiarize
B. Interpret
C. Mimic
D. possess
E. refine
21. It has been established that
P : Einstein was
Q : although a great scientist
R : weak in arithmetic
S : right from his school days
The Proper sequence should be:

A. SRPQ
B. QPRS
C. QPSR
D. RQPS
22. Pick out the best one which can complete incomplete stem correctly and meaningfully.
Despite his best efforts to conceal his anger ......

A. we could detect that he was very happy
B. he failed to give us an impression of his agony
C. he succeeded in camouflaging his emotions
D. he could succeed in doing it easily
E. people came to know that he was annoyed
23. When he
P : did not know
Q : he was nervous and
R : heard the hue and cry at midnight
S : what to do
The Proper sequence should be:

A. RQPS
B. QSPR
C. SQPR
D. PQRS
24. Asylum means:
Ans: A place where political refugees are given shelter.
25. Instructions: Please use the jumbled word given bellow to form correct question or statement:
To will we go today market the.

Ans: We will go to the market today.
26. Extempore means:
Ans: Spoken or done without preparation .
27. Which one is correctly spelled ?
Ans: Incidentally .
28. A man purchased a cow for Rs. 3000 and sold it the same day for Rs. 3600, allowing the buyer a credit of 2 years. If the rate of interest be 10% per annum, then the man has a gain of:
[A].0%
[B]. 5%
[C]. 7.5%
[D]. 10%
29. A fruit seller had some apples. He sells 40% apples and still has 420 apples. Originally, he had:
[A]. 588 apples
[B]. 600 apples
[C]. 672 apples
[D]. 700 apples
30. If 11a+11b=33 what is the average of a and b?
Ans: 1.5
31. What % of 50000 is 20000?
Ans: 40
32. Present ages of Sameer and Anand are in the ratio of 5 : 4 respectively. Three years hence, the ratio of their ages will become 11 : 9 respectively. What is Anand's present age in years?
A.24
B. 27
C. 40
D.Cannot be determined
33. A 270 metres long train running at the speed of 120 kmph crosses another train running in opposite direction at the speed of 80 kmph in 9 seconds. What is the length of the other train?
A.230 m
B. 240 m
C. 260 m
D.320 m
34. Sam purchased 20 dozens of toys at the rate of Rs. 375 per dozen. He sold each one of them at the rate of Rs. 33. What was his percentage profit?
[A]. 3.5
[B]. 4.5
[C]. 5.6
[D]. 6.5
35. solve (50/25-10)*(-1)
Ans: 8
36. A train running at the speed of 60 km/hr crosses a pole in 9 seconds. What is the length of the train?
A.120 metres
B. 180 metres
C. 324 metres
D.150 metres
37. In a box, there are 8 red, 7 blue and 6 green balls. One ball is picked up randomly. What is the probability that it is neither red nor green?

[A]. 1
3

[B]. 3
4
[C]. 7
19
[D]. 8
21
 Answer:
38. A is B’s sister. C is B’s mother, D is C’s father, E is D’s mother. What is the relationship of A and E?

 Answer: Grand daughter.

39. The hotel is two blocks east of the drugstore.
The market is one block west of the hotel.
The drugstore is west of the market.
If the first two statements are true, the third statement is

A.true
B. false
C. uncertain

 Answer:

40. Rasik walked 20 m towards north. Then he turned right and walks 30 m. Then he turns right and walks 35 m. Then he turns left and walks 15 m. Finally he turns left and walks 15 m. In which direction and how many metres is he from the starting position?

A.15 m West
B. 30 m East
C. 30 m West
D.45 m East
41. Seven boys- Rajan , Shyam,Vardhan,Mithra,Vimal………………………

 Answer:Vimal

42. Statements:
1. The prices of petrol and diesel in the domestic market have remained unchanged for the past few months.
2. The crude oil prices in the international market have gone up substantially in the last
few months.

A.Statement I is the cause and statement II is its effect
B. Statement II is the cause and statement I is its effect
C. Both the statements I and II are independent causes
D.Both the statements I and II are effects of independent causes
 Answer:

43. P,Q,R,S and T sitting around a table…………………………..

 Answer: T.

44. All Lamels are Signots with buttons.
No yellow Signots have buttons.
No Lamels are yellow.
If the first two statements are true, the third statement is


A.true
B. false
C. uncertain

45. A JSP page needs to…………………..

 Answer: ID
46. Statements: Vegetable prices are soaring in the market.
Conclusions:
1. Vegetables are becoming a rare commodity.
2. People cannot eat vegetables.


[A]. Only conclusion I follows
[B]. Only conclusion II follows
[C]. Either I or II follows
[D]. Neither I nor II follows

 Answer:

47. A method within a class is only accessible by classes that are defined within………………….

 Answer:Declare the method with the keyword protected.

48. Eileen is planning a special birthday dinner for her husband's 35th birthday. She wants the evening to be memorable, but her husband is a simple man who would rather be in jeans at a baseball game than in a suit at a fancy restaurant. Which restaurant below should Eileen choose?



A.Alfredo's offers fine Italian cuisine and an elegant Tuscan decor. Patrons will feel as
though they've spent the evening in a luxurious Italian villa.
B. Pancho's Mexican Buffet is an all-you-can-eat family style smorgasbord with the best
tacos in town.
C. The Parisian Bistro is a four-star French restaurant where guests are treated like royalty. Chef Dilbert Olay is famous for his beef bourguignon.
D.Marty's serves delicious, hearty meals in a charming setting reminiscent of a baseball clubhouse in honor of the owner,Marty Lester, a former major league baseball all-star

 Answer:

5 comments:

  1. rrb ntpc 2018
    CEN 01 2018rrb ranchi
    rrb thiruvananthpuram
    rrbpatna.gov.in
    The Railway Recruitment has been released official advertisement for RRB Assistant Loco Pilot (ALP) and Technician Jobs under RRB ALP 2018 recruitment. Check Here more rrb alp recruitment 2018 details.
    The Railway Recruitment has been released official advertisement for RRB Assistant Loco Pilot (ALP) and Technician Jobs under RRB ALP 2018 recruitment. Check Here more rrb alp recruitment 2018 details.
    Official advertisement for RRB Assistant Loco Pilot (ALP) and Technician Jobs under RRB ALP 2018 recruitment. Check Here rrb alp for Apply NOW.
    The online registration for the recruitment starts from 27th Jan 2018 to 26th Feb 2018 (23:59 pm).Check Here for complete details regarding the DMRC Recruitment 2018.
    JEE Main 2018 Admit Card will be released in the 2nd week of March 2018. The Central Board of Secondary Education (CBSE) will conduct one of the most reputed engineering examinations in the many exam centers situated across the country. JEE Mains or Joint Entrance Examination Main is conducted for all those aspiring engineers and architects who wish to take admission in the reputed NITs, IIITs and CFTIs. Check here how to download the JEE Main Admit Card from the CBSE JEE Main official website.

    ReplyDelete
  2. Nyc Post..
    Government Jobs offer an opportunity to turn your aspirations into reality. If you aspire to work in the mainstream and be a part of the nation's economic development, a job in the Government Sector may be the best option for you. Every year a number of job opportunities become available in the Government Sector.
    for more info : sarkarijob.ind.in

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete

Powered by Blogger.