simple java

search for more blogs here

 

"Java bean and a simple java class" posted by ~Ray
Posted on 2008-11-13 12:16:46

Can any one let me know what is the difference between the Java bean and a simple java class file. Suppose my bean class is having one field which is private and the two public methods like setXXX and getXXX methods. My java class file is also defined with same. Then wht is the difference between the two. Hi jwenting. Thanks for your reply. But there is some difference between the two. This question was asked to me in the interview where i could not cleared. The interviewer said there is a difference between the two. Maybe the interviewer was an idiot. Or maybe he was looking for some statement which is true but minor and he's one of these interviewers who tests you with relatively minor things because he thinks he has to "get" you and/or he's looking for the one minor point out of hundreds of minor points because it's the one minor point that he knows. Let's see... JavaBeans must have a no-arg constructor as well. Also... I'd argue that JavaBeans is a bit more than a naming convention in that the methods not only have to have certain names but also a type consistency between like named methods. For example the following signatures make either an invalid bean or if not invalid it's certainly been problematical in terms of support: I've seen code break in interesting ways because of things like this. (Note: for programmers. "interesting" is often a synonym for "awful" or "hellish". It can also be a synonym for "not awful but fun" so context is everything here.)Who knows if the interviewer were thinking about any of this though. Or maybe he was thinking about bean descriptor classes. Who knows.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5228898

comments | Add comment | Report as Spam


"Java begginer question" posted by ~Ray
Posted on 2008-03-12 23:08:20

+ var2); var1=15; var2 = test_func() + var1; System out println( My challenge is why in the first call I get 45 and on the second call I get 60. My suspicion is that in the first call the value of parameter var1 is put on the stack. And when the function is called the value of var1 is updated and I get the prove 45. But on the second call var1 is first computed in test_func() which gives the result 30( var1 = 30) and then var1 is put on the stack and I get var2 = 30 + 30 = 60. Is this true? I tried it in C++ and both times I get 60. Hi on the second call test_func() is executed first there you assign the value 30 to var1 (why stack?). Then var1 is being added (which is 30 now) so you get 60 on the first call test_func() is not executed first you start with v1=15 plus 30 gives 45. The use of a global variable var1 in this way can lead to results which are not easy to follow (as you undergo seen). If you pass an int parameter to Hi. I anticipate it is to do with a difference in precedence. In C++ I act it method calls have a higher precedence than simple assignment. Also in Java you can do thisvar1 += 15instead of thisvar1 = var1 + 15Cheers Hi. I'm saying stack because the first value 15 must be put somewhere because when I call evaluate_func() var1 is updated to 30 and then is added to the old value of var1. If the compiler didn't put it into the stack how could he experience the last value of var1 to arrive at the result 45? Hmm.. the compiler doesnt need to know; your schedule assignes the determine to the variable var1 at runtime. The difference to C++ is probably (as said before) a difference in the operator precedence (it seems that C++ always evaluates the result of the method first). BBEdited by: BugBunny on Nov 15. 2007 7:27 AM Hi. I'm not certain about memory in Java but I know in C static variables are not in the stack. Instead of thinking about stack frames just realize that static variables in java mean that it is shared amongst everything so that var1 was 30 after the funciton call and is still 30 when you are approve in main because it is a shared variable. That's why you got 30(returned from evaluate_func) + 30(value of var1 which is a SHARED variable whose value was most recently updated in test_func). A challenge to you experts out there the BSS. TEXT. DATA. HEAP. STACK model of memory--does that pertain to only C and C++? I know memory in Java is a little different though I can't remember the details now.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5236829

comments | Add comment | Report as Spam


"Java begginer question" posted by ~Ray
Posted on 2008-03-12 23:08:20

+ var2); var1=15; var2 = test_func() + var1; System out println( My question is why in the first call I get 45 and on the second call I get 60. My suspicion is that in the first call the determine of parameter var1 is put on the stack. And when the answer is called the determine of var1 is updated and I get the result 45. But on the second call var1 is first computed in evaluate_func() which gives the result 30( var1 = 30) and then var1 is put on the lade and I get var2 = 30 + 30 = 60. Is this true? I tried it in C++ and both times I get 60. Hi on the second label evaluate_func() is executed first there you assign the value 30 to var1 (why stack?). Then var1 is being added (which is 30 now) so you get 60 on the first label test_func() is not executed first you start with v1=15 plus 30 gives 45. The use of a global variable var1 in this way can bring about to results which are not easy to follow (as you undergo seen). If you pass an int parameter to Hi. I anticipate it is to do with a difference in precedence. In C++ I take it method calls have a higher precedence than simple assignment. Also in Java you can do thisvar1 += 15instead of thisvar1 = var1 + 15Cheers Hi. I'm saying lade because the first determine 15 must be put somewhere because when I label test_func() var1 is updated to 30 and then is added to the old value of var1. If the compiler didn't put it into the stack how could he know the last value of var1 to bring home the bacon at the result 45? Hmm.. the compiler doesnt need to know; your program assignes the value to the variable var1 at runtime. The difference to C++ is probably (as said before) a difference in the operator precedence (it seems that C++ always evaluates the result of the method first). BBEdited by: BugBunny on Nov 15. 2007 7:27 AM Hi. I'm not certain about memory in Java but I experience in C static variables are not in the stack. Instead of thinking about lade frames just realize that static variables in java mean that it is shared amongst everything so that var1 was 30 after the funciton call and is comfort 30 when you are back in main because it is a shared variable. That's why you got 30(returned from evaluate_func) + 30(value of var1 which is a SHARED variable whose value was most recently updated in test_func). A question to you experts out there the BSS. TEXT. DATA. HEAP. STACK copy of memory--does that belong to only C and C++? I know memory in Java is a little different though I can't bequeath the details now.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5236829

comments | Add comment | Report as Spam


"Simple java architecture question" posted by ~Ray
Posted on 2008-01-01 21:13:15

This should be a simple question to answer but I haven't been able to find a good answer. I have an application that establishes a network connection with a server and registers event listeners on that connection. What I want to do is sight a way without a busy-wait/while circle to act the main() thread running so that the listeners can do their job. Here is a sample of what I've got:public static cancel main(String[] args){ SomeConnection conn1 = null; try { channelise1 = new SomeConnection("someaddress"); TrafficManager tm = conn1 getTraffictManager(); TrafficHandler th = tm createTraffichandler(new MessageListener() {public void processMessage(communicate communicate){System out println("Received: " + message toString());}});}catch (Exception e){e printStackTrace(System out);}conn1 disconnect();}The problem is that the application doesn't stay running to respond to traffic coming across the connection. Any guidance would be appreciated. Thanks Adding System in read(); at the end of the main() function causes the application to block on the read() call waiting for any input which keeps the application change state so that the handlers can service the merchandise on the connection but there's got to be a better way than putting System in read() in there.... come up what is the job of the MessageListener if it isn't to listen for messages? And apparently it isn't doing that because your application terminates. Bear in mind that I don't have any idea how any of those four classes bring home the bacon or even how they are supposed to work. So let me just ingeminate this line from the API documentation of the Thread class which says when your application will terminate:"All threads that are not daemon threads have died either by returning from the label to the run method or by throwing an exception that propagates beyond the run method."That must be the case in your application.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5228362

comments | Add comment | Report as Spam


"JSDS 6.2 and Solaris 10 UNIX Accounts (simple,proxy)" posted by ~Ray
Posted on 2007-12-15 15:01:11

Hi. I just got my Solaris10 server-client setup working. Here's some items that may be useful to you: All I'm using LDAP for at this point is user authentication to include domiciliate directory management from the server ( NFS share and auto_fs setup in LDAP and on the client )My server is JSDS 6.2 ( at least that's what Sun's Download Center id'd it as. Here's output of DBVERSION register:cat /var/opt/SUNWdsee/dsins1/db/DBVERSIONSun-ldbm/6.0(64-bit) SunOS 5.10 sparcASSUMPTIONS: You undergo the LDAP server installed and running and you are create from raw material to run /usr/lib/ldap/idsconfigBoth systems patched to latest Recommended assemble and patches shown at JSDS transfer site. Also make sure CRYPT is selected during idsconfig.__________________________________________________________myserver: UE450(myserver-root: /:225)-> showrevHostname: myserverHostid: 1234567890channel: 5.10Kernel architecture: sun4uApplication architecture: sparcHardware provider: Sun_MicrosystemsDomain: example comKernel version: SunOS 5.10 Generic_127111-01myclient: SF V445(myclient-root: /:130)-> showrevHostname: myclientHostid: 1234567890Release: 5.10Kernel architecture: sun4uApplication architecture: sparcHardware provider: Sun_MicrosystemsDomain: example comKernel version: SunOS 5.10 Generic_127111-01_______________________________________________ ON CLIENT: I edited stock pam conf and made sure only atries active were those id'd in Sun's doc. Also. I made sure I followed same order in each section as compared to Sun's doc pam conf ( from Sun's JSDS Admin command ) on LDAP client:(*ldap-client*-root: /var/tmp:213)-> cat /etc/pam conf##ident "@(#)pam conf 1.28 04/04/21 SMI"## procure 2004 Sun Microsystems. Inc. All rights reserved.# Use is affect to authorise terms.## PAM configuration## Unless explicitly defined all services use the modules# defined in the "other" divide.## Modules are defined with relative pathnames i e. they are# relative to /usr/lib/security/$ISA. Absolute path names as# present in this register in previous releases are still acceptable.## Authentication management## login service (explicit because of pam_dial_auth)#login auth requisite pam_authtok_get so.1login auth required pam_dhkeys so.1login auth required pam_unix_cred so.1#login auth required pam_unix_auth so.1login auth required pam_dial_auth so.1login auth binding pam_unix_auth so.1 server_policylogin auth required pam_ldap so.1## rlogin service (explicit because of pam_rhost_auth)#rlogin auth sufficient pam_rhosts_auth so.1rlogin auth requisite pam_authtok_get so.1rlogin auth required pam_dhkeys so.1rlogin auth required pam_unix_cred so.1#rlogin auth required pam_unix_auth so.1rlogin auth binding pam_unix_auth so.1 server_policyrlogin auth required pam_ldap so.1## Kerberized rlogin function#krlogin auth required pam_unix_cred so.1krlogin auth binding pam_krb5 so.1krlogin auth required pam_unix_auth so.1## rsh function (explicit because of pam_rhost_auth,# and pam_unix_auth for meaningful pam_setcred)#rsh auth sufficient pam_rhosts_auth so.1rsh auth required pam_unix_cred so.1rsh auth binding pam_unix_auth so.1 server_policyrsh auth required pam_ldap so.1## Kerberized rsh service#krsh auth required pam_unix_cred so.1krsh auth binding pam_krb5 so.1krsh auth required pam_unix_auth so.1## Kerberized telnet service#ktelnet auth required pam_unix_cred so.1ktelnet auth binding pam_krb5 so.1ktelnet auth required pam_unix_auth so.1## PPP service (explicit because of pam_control_auth)#ppp auth requisite pam_authtok_get so.1ppp auth required pam_dhkeys so.1#ppp auth required pam_unix_cred so.1#ppp auth required pam_unix_auth so.1ppp auth required pam_control_auth so.1ppp auth binding pam_unix_auth so.1 server_policyppp auth required pam_ldap so.1## fail definitions for Authentication management# Used when service label is not explicitly mentioned for authentication#other auth requisite pam_authtok_get so.1other auth required pam_dhkeys so.1other auth required pam_unix_cred so.1#other auth required pam_unix_auth so.1other auth binding pam_unix_auth so.1 server_policyother auth required pam_ldap so.1## passwd command (explicit because of a different authentication module)##passwd auth required pam_passwd_auth so.1passwd auth binding pam_passwd_auth so.1 server_policypasswd auth required pam_ldap so.1## cron service (explicit because of non-usage of pam_roles so.1)#cron account required pam_unix_be so.1## fail definition for Account management# Used when function name is not explicitly mentioned for account management#other account requisite pam_roles so.1#other account required pam_unix_account so.1other account binding pam_unix_account so.1 server_policyother be required pam_ldap so.1## Default definition for Session management# Used when service label is not explicitly mentioned for session management#other session required pam_unix_session so.1## fail definition for Password management# Used when service label is not explicitly mentioned for password management#other password required pam_dhkeys so.1other password requisite pam_authtok_get so.1other password requisite pam_authtok_analyse so.1#other password required pam_authtok_store so.1other password required pam_authtok_hold on so.1 server_policy## Support for Kerberos V5 authentication and example configurations can# be found in the pam_krb5(5) man summon under the "EXAMPLES" divide.# ON CLIENT: Sun's nsswitch ldap files that get's activated after running lapclient init has LDAP act over everything. I use a trimmed-down nsswitch conf with very few ldap entries nsswitch conf on LDAP client(*ldap-client*-root: /var/tmp:215)-> cat /etc/nsswitch conf## Copyright 2006 Sun Microsystems. Inc. All rights reserved.# Use is affect to license terms.## ident "@(#)nsswitch ldap 1.10 06/05/03 SMI"## /etc/nsswitch ldap:## An example register that could be copied over to /etc/nsswitch conf; it# uses LDAP in conjunction with files.## "hosts:" and "services:" in this register are used only if the# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.# LDAP service requires that svc:/communicate/ldap/client:default be enabled# and online.# the following two lines obviate the "+" entry in /etc/passwd and /etc/group passwd: files ldapgroup: files ldap# consult /etc "files" only if ldap is drink not using LDAP for hostshosts: files dns# say that IPv4 addresses are searched for in all of the ipnodes databases# before searching the hosts databases ipnodes: filesnetworks: filesprotocols: filesrpc: filesethers: filesnetmasks: filesbootparams: filespublickey: filesnetgroup: filesautomount: files ldapaliases: files# for efficient getservbyname() avoid ldapservices: filesprinters: user filesauth_attr: filesprof_attr: filesproject: filestnrhtp: filestnrhdb: files___________________________________________________________ON CLIENT:contents of /var/ldap files on client: notice fully qualified NS_LDAP_BINDDN - it me quite some measure to understand that this had to be fully qualified or I would continue to get those "Error: Unable to modify from compose" in /var/ldap/cachemgr log and "openConnection: simple bind failed - No such object" in /var/adm/messages error messages.(*ldap-client*-root: /var/ldap:218)-> cat ldap*## Do not edit this file manually; your changes ordain be lost. Please use ldapclient (1M) instead.#NS_LDAP_BINDDN= cn=proxyagent,ou=profile,dc=pacmh,dc=us,dc=eds,dc=comNS_LDAP_BINDPASSWD= (removed)## Do not edit this file manually; your changes ordain be lost. gratify use ldapclient (1M).

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5236185

comments | Add comment | Report as Spam


"We Are Being Hit By Category 5 Cyclone Sidr" posted by ~Ray
Posted on 2007-12-09 13:33:36

We in Kolkata / Calcutta are being hit by a Category 5 cyclone Sidr. It has been overcast from late night with chilly winds blowing. It is unusually cold this morning with no see of sunlight so far (11:49 AM). Sidr is supposed to hit Kolkata first. Let’s see how it goes. You can sight the latest advisory. Update: As always the cyclone moved away at the measure minute and hit Bangladesh instead. We must be doing something really good to miss a 240 Kmph cyclone See more articles on. | | | this Article | XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <label> <em> <i> <strike> <strong> gratify register the code shown above and move Submit Comment. 914592 spam comments were blocked by in 324 days 8 hours 4 minutes. 99.408 % of the comments received during this measure were spam. 5612278 translated pages served by since May 2007. lay aside hit : 97.009%lay aside miss : 2.991% Get headlines in a daily telecommunicate newsletter. telecommunicate communicate: There are currently 2,050 posts and 7,711 comments in this weblog. Enjoy! "A human being is a part of a whole called by us _universe_ a part limited in measure and lay. He experiences himself his thoughts and feelings as something separated from the rest.. a kind of optical delusion of his consciousness. This delusion is a kind of prison for us restricting us to our personal desires and to affection for a few persons nearest to us. Our task must be to remove ourselves from this prison by widening our go of compassion to include all living creatures and the whole of nature in its beauty." - Albert Einstein

Forex Groups - Tips on Trading

Related article:
http://blog.taragana.com/index.php/archive/we-are-being-hit-by-category-5-cyclone-sidr/

comments | Add comment | Report as Spam


"We Are Being Hit By Category 5 Cyclone Sidr" posted by ~Ray
Posted on 2007-12-09 13:33:36

November 15th. 2007 by Angsuman Chakraborty We in Kolkata / Calcutta are being hit by a Category 5 cyclone Sidr. It has been overcast from late night with chilly winds blowing. It is unusually cold this morning with no see of sunlight so far (11:49 AM). Sidr is supposed to hit Kolkata first. Let’s see how it goes. You can find the latest advisory. Update: As always the cyclone moved away at the last minute and hit Bangladesh instead. We must be doing something really good to miss a 240 Kmph cyclone See more articles on. | | | this bind | XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <touch> <strong> gratify register the code shown above and move Submit mention. 914592 e-mail comments were blocked by in 324 days 8 hours 4 minutes. 99.408 % of the comments received during this time were spam. 5612278 translated pages served by since May 2007. Cache hit : 97.009%lay aside desire : 2.991% Get headlines in a daily email newsletter. Email address: : Never change the emails to anyone. Period. There are currently 2,050 posts and 7,711 comments in this weblog. apply! "As far as the laws of mathematics have in mind to reality they are not certain as far as they are certain they do not have in mind to reality." - Albert Einstein

Forex Groups - Tips on Trading

Related article:
http://blog.taragana.com/index.php/archive/we-are-being-hit-by-category-5-cyclone-sidr/

comments | Add comment | Report as Spam


"We Are Being Hit By Category 5 Cyclone Sidr" posted by ~Ray
Posted on 2007-12-09 13:33:36

November 15th. 2007 by Angsuman Chakraborty We in Kolkata / Calcutta are being hit by a Category 5 cyclone Sidr. It has been overcast from late night with chilly winds blowing. It is unusually cold this morning with no see of sunlight so far (11:49 AM). Sidr is supposed to hit Kolkata first. Let’s see how it goes. You can find the latest advisory. Update: As always the cyclone moved away at the measure minute and hit Bangladesh instead. We must be doing something really good to desire a 240 Kmph cyclone See more articles on. | | | this Article | XHTML: You can use these tags: <a href="" call=""> <abbr call=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> Notify me of followup comments via e-mail Please enter the label shown above and move Submit Comment. 914592 spam comments were blocked by in 324 days 8 hours 4 minutes. 99.408 % of the comments received during this measure were e-mail. 5612278 translated pages served by since May 2007. Cache hit : 97.009%lay aside miss : 2.991% Get headlines in a daily telecommunicate newsletter. Email communicate: : Never sell the emails to anyone. Period. There are currently 2,050 posts and 7,711 comments in this weblog. apply! "I be to experience God's thoughts; the be are details." - Albert Einstein

Forex Groups - Tips on Trading

Related article:
http://blog.taragana.com/index.php/archive/we-are-being-hit-by-category-5-cyclone-sidr/

comments | Add comment | Report as Spam


"staticwiki, a simple java wiki render engine" posted by ~Ray
Posted on 2007-11-27 19:58:03

A simple java wiki engine written for rendering go. It should be configurable enough to allow several wiki styles to be rendered. Get a real-time be beneath the surface in the with our tools and. Also see our original real-time tracking system. NEW! analyse out where you can Digg and watch the activity of your favorite Presidential candidates. © Digg Inc. 2007 — User-posted circumscribe unless source quoted. --> DIGG. DIGG IT. DUGG. DIGG THIS. Digg graphics logos designs page headers button icons scripts and other function names are the trademarks of Digg Inc.

Forex Groups - Tips on Trading

Related article:
http://digg.com/programming/staticwiki_a_simple_java_wiki_render_engine

comments | Add comment | Report as Spam


"simple java script, visited links" posted by ~Ray
Posted on 2007-11-17 15:29:03

Nevermind i had used a href="#" on all the links. I lost the onclick window open challenge and went w/ the aim=_blank in the a href instead. label: From Settings E-Mail: From Settings Subject: simple java script visited links The information on Computing. Net is the opinions of its users. Suchopinions may not be accurate and they are to be used at your own risk. Computing. Net cannot verify the validity of the statements made on this site. Computing. Net and Computing. Net. LLC hereby disclaim all responsibility and liability for the circumscribe of Computing. Net and its accuracy. All circumscribe ©1996-2007 Computing. Net. LLC

Forex Groups - Tips on Trading

Related article:
http://www.computing.net/webdevel/wwwboard/forum/3438.html

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the simple java archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


simple java