The Artima Developer Community
Sponsored Link

Java Answers Forum
JAVA OBJECTIVE QUESTIONS

8 replies on 1 page. Most recent reply: Mar 16, 2011 5:36 AM by Anil Reddy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 8 replies on 1 page
Subin george

Posts: 1
Nickname: subin
Registered: Jul, 2003

JAVA OBJECTIVE QUESTIONS Posted: Jul 29, 2003 9:25 AM
Reply to this message Reply
Advertisement
Plz suggest me some free web sites that provide JAVA OBJECTIVE QUESTIONS on various topics like Core java,Applets,Servlets,JSP,JAVABEANS etc


KR F

Posts: 10
Nickname: kr
Registered: Jul, 2003

Re: JAVA OBJECTIVE QUESTIONS Posted: Jul 29, 2003 11:49 AM
Reply to this message Reply
http://java.about.com/cs/freejavaexams/

http://java.about.com/library/quizzes/blscjp-001.htm

KR F

Posts: 10
Nickname: kr
Registered: Jul, 2003

Re: JAVA OBJECTIVE QUESTIONS Posted: Jul 29, 2003 12:05 PM
Reply to this message Reply
Found this
http://www.aniyog.com/java/certification/java_mock_test2.htm

Ashok Gupta

Posts: 3
Nickname: akgupta
Registered: Jan, 2003

Re: JAVA OBJECTIVE QUESTIONS Posted: Aug 26, 2003 5:49 AM
Reply to this message Reply
Here is another one :

http://www.akgupta.com/Java/certification.htm

Tahsin Syed Rukhsana

Posts: 1
Nickname: tahsin
Registered: Sep, 2007

Re: JAVA OBJECTIVE QUESTIONS Posted: Sep 26, 2007 5:30 AM
Reply to this message Reply
plz...plz...any body
Plz suggest me some free web sites that provide JAVA OBJECTIVE QUESTIONS on various topics like Core java,Applets,Servlets,JSP,JAVABEANS etc preparing for my JCP...its urgent.........

Pankaj Shinde

Posts: 2
Nickname: pank
Registered: Feb, 2004

Re: JAVA OBJECTIVE QUESTIONS Posted: Oct 17, 2007 12:46 AM
Reply to this message Reply
There are many sites which has mock tests. Search on google you will get a extensive list.

I am including few websites which I found useful.

http://certification.about.com/od/freequestions/Tons_of_Java_Cert_Practice_Tests.htm

http://www.javacamp.org/jobinterview.html

http://www.techinterviews.com/?cat=4

http://www.freeprogrammingresources.com/javadoc.html

http://www.allapplabs.com/interview_questions/java_interview_questions.htm

sam jackson

Posts: 2
Nickname: unk
Registered: Sep, 2010

Re: JAVA OBJECTIVE QUESTIONS Posted: Sep 13, 2010 8:41 PM
Reply to this message Reply
Description:

You have been hired to computerize Creighton's intramural basketball records. Each team in the intramural league has a unique name and plays some number of games against other teams in the league (possibly playing the same team more than once). You are to take the scores of all the games played and create the standings for the league, displaying the win-loss records for the teams and ordering them based on the number of wins.
Input:

The input will consist of some number of lines of text of the form

NameH ScoreH NameV ScoreV

where NameH is the name of the home team, ScoreH is the home team's score, NameV is the name of the visiting team, and ScoreV is the visiting team's score. You may assume that there are no ties, so one of the scores will be larger and signify the winner of that game. The last line of input will have negative numbers for each of the scores.
Example Input:

Jays 85 Dogs 80
Cats 65 Dogs 70
Squirrels 77 Jays 78
Cats 80 Squirrels 55
? -1 ? -1

Output:

For each team listed in the scores, you should output a line containing the team name followed by their win-loss record. There should be one space between the team name and the number of wins, and a single hyphen between the number of wins and losses. Teams should be listed in order based on wins. That is, the team with the most wins should be listed first and the team with the fewest wins last. Among teams with the same number of wins, they should be listed in alphabetical order by team name. The output should terminate with the word "DONE" on a line by itself.
Example Output:

Jays 2-0
Cats 1-1
Dogs 1-1
Squirrels 0-2
DONE

sam jackson

Posts: 2
Nickname: unk
Registered: Sep, 2010

Can you please help? how do I go about doing this? Posted: Sep 13, 2010 8:44 PM
Reply to this message Reply
> Plz suggest me some free web sites that provide JAVA
> OBJECTIVE QUESTIONS on various topics like Core
> java,Applets,Servlets,JSP,JAVABEANS etc

Description:

You have been hired to computerize Creighton's intramural basketball records. Each team in the intramural league has a unique name and plays some number of games against other teams in the league (possibly playing the same team more than once). You are to take the scores of all the games played and create the standings for the league, displaying the win-loss records for the teams and ordering them based on the number of wins.
Input:

The input will consist of some number of lines of text of the form

NameH ScoreH NameV ScoreV

where NameH is the name of the home team, ScoreH is the home team's score, NameV is the name of the visiting team, and ScoreV is the visiting team's score. You may assume that there are no ties, so one of the scores will be larger and signify the winner of that game. The last line of input will have negative numbers for each of the scores.
Example Input:

Jays 85 Dogs 80
Cats 65 Dogs 70
Squirrels 77 Jays 78
Cats 80 Squirrels 55
? -1 ? -1

Output:

For each team listed in the scores, you should output a line containing the team name followed by their win-loss record. There should be one space between the team name and the number of wins, and a single hyphen between the number of wins and losses. Teams should be listed in order based on wins. That is, the team with the most wins should be listed first and the team with the fewest wins last. Among teams with the same number of wins, they should be listed in alphabetical order by team name. The output should terminate with the word "DONE" on a line by itself.
Example Output:

Jays 2-0
Cats 1-1
Dogs 1-1
Squirrels 0-2
DONE

Anil Reddy

Posts: 2
Nickname: anilreddyv
Registered: Mar, 2011

Re: JAVA OBJECTIVE QUESTIONS Posted: Mar 16, 2011 5:36 AM
Reply to this message Reply
public static void puzzle() throws IOException
{
File f=new File("D://input.txt");
FileInputStream fis=new FileInputStream(f);
DataInputStream dis=new DataInputStream(fis);
String line=dis.readLine();
Pattern p=Pattern.compile("(\\w+)\\s(\\d+)\\s(\\w+)\\s(\\w+)");
Map<String,List<Integer>> map=new HashMap<String, List<Integer>>();
while(line!=null)
{
Matcher matcher=p.matcher(line);
if(matcher.find())
{
if(Integer.parseInt(matcher.group(2))>Integer.parseInt(matcher.group(4)))
{
if(map.containsKey(matcher.group(1)))
{
List<Integer> l=map.get(matcher.group(1));
int val=l.get(0);
val++;
l.set(0, val);
map.put(matcher.group(1), l);
}
else
{
List<Integer> ls=new ArrayList<Integer>(2);
ls.add(0, 1);
ls.add(1, 0);
map.put(matcher.group(1), ls);
}

if(map.containsKey(matcher.group(3)))
{
List<Integer> l=map.get(matcher.group(3));
int val=l.get(1);
val++;
l.set(1, val);
map.put(matcher.group(3), l);
}
else
{
List<Integer> ls=new ArrayList<Integer>(2);
ls.add(0, 0);
ls.add(1, 1);
map.put(matcher.group(3), ls);
}
}
else
{
if(map.containsKey(matcher.group(3)))
{
List<Integer> l=map.get(matcher.group(3));
int val=l.get(0);
val++;
l.set(0, val);
}
else
{
List<Integer> ls=new ArrayList<Integer>(2);
ls.add(0, 1);
ls.add(1, 0);
map.put(matcher.group(3), ls);
}

if(map.containsKey(matcher.group(1)))
{
List<Integer> l=map.get(matcher.group(1));
int val=l.get(1);
val++;
l.set(1, val);
map.put(matcher.group(1), l);
}
else
{
List<Integer> ls=new ArrayList<Integer>(2);
ls.add(0, 0);
ls.add(1, 1);
map.put(matcher.group(1), ls);
}
}

line=dis.readLine();
}
}

Set<String> s=map.keySet();
Iterator<String> it=s.iterator();
while(it.hasNext())
{
String var=it.next();
List<Integer> lt=map.get(var);
System.out.println(var+" "+lt.get(0)+"-"+lt.get(1));
}
}

Flat View: This topic has 8 replies on 1 page
Topic: New to Java- Desperately need some help on basic java program Previous Topic   Next Topic Topic: Interposes Synchronization in Java


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us