Help coderanch get a
new server
by contributing to the fundraiser

aryan sanghvi

Greenhorn
+ Follow
since Jun 13, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by aryan sanghvi

How do you find a localized value for a given key, for example, an error message?

I found this answer.

Use java.util.Properties to load values from a stream(e.g. a java.io.FileInputStream) and then use a singlelookup key to obtain a localized value

But Why not using Resource Bundle ?
Properties file:
Properties file stores information about the characteristics of a program or environment including internationalization/localization information.
file.properties and java.util.properties ..what is the relation.??


eg:
greetings = Hello
farewell = Goodbye
inquiry = How are you?



What is a Resource Bundle?

message = ResourceBundle.getBundle("MessagesBundle",
currentLocale);

A resource bundle is essentially one or more Java "properties" files.
ResourceBundle objects contain locale-specific objects. You use ResourceBundle objects to isolate locale-sensitive data, such as translatable text. In the sample program the ResourceBundle is backed by the properties files that contain the message text we want to display.

Can you please clarify Resource bundle & Properties file..difference and usage.
Compact Computers is a small computer assembly company. Their online application allows customers to pick and choose accessories to build their own PCs. The accessories are:

i. Processor - 800Mhz, 1Ghz, 1.2Ghz

ii. HDD - 40 GB, 60 GB, 80 GB

iii. Memory - 128 MB, 256 MB, 512 MB

If a computer can have exactly 1 processor, 1 HDD and 1 memory stick, what pattern would be best used here?

A Factory Method

B Builder

C Prototype

D Abstract Factory

E Singleton

Can somebody please explain why it the answer is Builder ?
HTTP is


A Connection Less

B Connection Base

C Stateful

D Stateless

E Secure

when such a question, appear can I presume HTTP means HTTP 1.1 since the answer assuming 1.1 would be
B and D but assuming HTTP 1.0 would A and D.

Appreciate your help.
Can any one Please help, Most of the people score really low in these 2 sections.
Can any body guide more preparation strategies on these.

Common Architectures
Legacy Connectivity
Can you Please let me know, Most of the people score really low in these 2 sections.
Can any body guide more preparation strategies on this one.

Common Architectures
Legacy Connectivity

Thank you,
Hi guys,
I have a basic question regarding the exam.
Do they give the no of answers to be picked for all the questions.
I mean pick 2 answers for this question....
kind of..
Since one of the mock exams I have take does not
say so.

Thank You,
Hi,
Could any one help me with different time complexities of java class methods.
I want to find the time complexities for
different methods of BigInteger class.

aryan
The IndexOf Returns -1 when
I try to add an element of a class into LinkedList
and use indexOf woudl return -1.
I know the reason..sort of being not the same
of objects..even though the states of the
objects are same.Could somebody help me with
the A code for any class which would make my
class complaint..with all the other comparing
and indexOf kind of functions.

import java.util.LinkedList;
import java.util.ListIterator;
class test{
public test(String newStr, Character newChr){
str = newStr;
chr = newChr;
}
private String str;
private Character chr;
public String toString(){
return (str + " " + chr.toString());
}
static public void p(Object o){
System.out.println(o.toString());
}
}
class list{
private LinkedList myList;
public list(){
myList = new LinkedList();
myList.add( new test("A", new Character('b')) );
test srch = new test("A", new Character('b'));
int index = myList.indexOf(srch);
System.out.println(index);
if (myList.contains(srch) == true){
p("contains");
}
}
public static void main(String[] args){
list stateList = new list();
}
static public void p(String s){
System.out.println(s);
}
}
Hi,
I wanna give take up the assignment for the java developer
and also want to buy the voucher for the essay exam part of it.
Could some body tell me how mch time it will take to finish the assignment.
I am a Masters student and can give enough time.
Thank You,
aryan
Hi Yall,
Thnqs for the help. I passed my SJCP and looking
forward to SCJD.
Aryan
22 years ago
Hi,
I passed my JCP and I am really..interested in
going to Java Developer Program..But want
to know ..more details and objectives..
pass percentage..
Thank You
aryan
Hi Yall,
Thanqs a Bunch for helping.
I passed the version 2 exam. Did not
a great percentage to put on here But I am Happy cuz..worked only for 4 weeks ..mostly..weekends..
Thank you again..
Here's my questions on the next stage.
exam and details how tough is it to pass..the developer..exam ?
Aryan
22 years ago
Hey,
Thnqs a lot for helping all the way.
I have my exam after 2 days.
I am not one hundred percent confident about
How to chain the stream classes.any suggestions please please.
2. Can any body tell me how many questions appear in the exam which do not have answers in the
multiple choices..since I read somewhere as one
of the trick could be just leaving the question without attempting if none of the answers match.
How many of those appear approximately..??
3.I am givin java 1.2 any suggestions..?
Thank You,
aryan
Its a mock exam question and the author
gives the reason as
public class Test020 extends Super //1
{ public static void main(String args[]) { Test020 s = new Test020(); //2 s.method(); }
}
class Super { private Super() { } //3
public void method() {
System.out.println("0"); }

}
Q.
What is the output of trying to compile and run the following code?
(Select one correct answer)
and the ans is 1 and the explnation
give is
The super class contructor has private
access and it is the only contructor,
which prevents it from being subclassed.

My Question.
But what abt the final class, doesn't it stop
from inheriting.
and private on constructor from instatiation.