<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title>W3Exchange : Script Forums : Java</title>
<link>http://www.w3exchange.com</link>
<description> W3Exchange</description>
<language>en</language>
<docs>http://backend.userland.com/rss</docs>
<item>
<title>Thread Synchronization In Java in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7849#7849</link>
<guid isPermaLink="false">7849@http://www.w3exchange.com</guid>
<description>Topic: Thread Synchronization In Java

Message: Hi,Threads commonly share the same memory space area, that’s why they can share the resources. Threads commonly communicate by sharing access to fields and the objects reference fields refer to. This communication type is extremely efficient, but makes two kinds of problems: thread interference and memory consistency errors. By the synchronization tool we can avoid this problem.Synchronized methods are useful in those situations where methods can manipulate the state of an object in ways that can corrupt the state if executed concurrently. Stack implementations usually define the two operations push and pop of elements as synchronized, that’s why pushing and popping are mutually exclusive operations. For Example if several threads were sharing a stack, if one thread is popping the element on the stack then another thread would not be able to pushing the element on the stack.The following program demonstrates the synchronized method:
Code::public class SynThread{
    public static void main(String args[]){
        Share s=new Share();
        MyThread m1=new MyThread(s,"Thread1");
        MyThread m2=new MyThread(s,"Thread2");
        MyThread m3=new MyThread(s,"Thread3");
    }
}
class MyThread extends Thread{
    Share s;
    MyThread(Share s,String str){
        super(str);
        this.s=s;
        start();
    }
    public void run(){
        s.doword(Thread.currentThread().getName());
    }
}
class Share{
    public synchronized void doword(String str){
        for(int i=0;i&#60;5;i++){
        System.out.println("Started   :"+str);
        try{
            Thread.sleep(100);
        }catch(Exception e){}
        }
    }
}
ThanksFuad
</description>
<pubDate>Wed, 14 May 2008 03:05:30 -0700</pubDate>
</item>
<item>
<title>Benefits of Ajax in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7823#7823</link>
<guid isPermaLink="false">7823@http://www.w3exchange.com</guid>
<description>Topic: Benefits of Ajax

Message: Ajax is new very promising technology, which has become extremely popular these days. Here are the benefits of using Ajax:* Ajax can be used for creating rich, web-based applications that look and works like a desktop application.* Ajax is easy to learn. Ajax is based on JavaScript and existing technologies like XML, CSS, DHTML. etc. So, its very easy to learn Ajax.* Ajax can be used to develop web applications that can update the page data continuously without refreshing the whole page.
</description>
<pubDate>Sat, 10 May 2008 03:42:14 -0700</pubDate>
</item>
<item>
<title>Multitasking &#38; Multithreading in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7799#7799</link>
<guid isPermaLink="false">7799@http://www.w3exchange.com</guid>
<description>Topic: Multitasking &#38; Multithreading

Message: Multitasking allow to execute more than one tasks at the same time, a task being a program. In multitasking only one CPU is involved but it can switches from one program to another program so quickly that's why it gives the appearance of executing all of the programs at the same time. Multitasking allow processes (i.e. programs) to run concurrently on the program. For Example running the spreadsheet program and you are working with word processor also.Multitasking is running heavyweight processes by a single OS.Multithreading is running multiple lightweight processes in a single process/ task or program. For Example, When you used a word processor you performs a many different tasks such as printing, formatting text, spell checking and so on. Multithreaded software treats each process as a separate program.Some advantages of multithreading over multitasking are:&#160; &#160; * Threads share the same address space.&#160; &#160; * Context switching between threads is usually less expensive than between processes.&#160; &#160; * Cost of communication between threads is relatively low.
</description>
<pubDate>Tue, 06 May 2008 23:57:48 -0700</pubDate>
</item>
<item>
<title>Java Thread Creation in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=7774#7774</link>
<guid isPermaLink="false">7774@http://www.w3exchange.com</guid>
<description>Topic: Java Thread Creation

Message: Hi,For creating a thread a class have to extend the Thread Class. For creating a thread by this procedure you have to follow these steps:Extend the java.lang.Thread Class.Thanks
</description>
<pubDate>Sat, 03 May 2008 01:54:15 -0700</pubDate>
</item>
<item>
<title>What sort of certifications are there for Java? in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=4939#4939</link>
<guid isPermaLink="false">4939@http://www.w3exchange.com</guid>
<description>Topic: What sort of certifications are there for Java?

Message: I've been writing software professionally for 30+ years and never have encountered anyone who hired based on certifications, or was hired based on certifications.
</description>
<pubDate>Mon, 13 Aug 2007 17:55:19 -0700</pubDate>
</item>
<item>
<title>Java code - Please see this code in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=559#559</link>
<guid isPermaLink="false">559@http://www.w3exchange.com</guid>
<description>Topic: Java code - Please see this code

Message: xreddawg909x wrote:If someone could look over this code i wrote and see if its done correctly i would greatly appreciate it.. i use netbeans and when i click &#34;run&#34; the ms dos window doesn't come up and run the program like dev c does for c++its supposed to ask for integers and add'em up and give a sum at the end, it shouldn't accept negative integers.
Code::import java.util.Scanner;

public class Main 
{
    
    /** Creates a new instance of Main */
    public Main() 
    {
    
    
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) 
    {
        // TODO code application logic here
       Scanner input = new Scanner( System.in );
        
        int hold, sum,option,count;
        sum = 0;
        do 
        {    
        count = 0;    
        hold = 0;
        System.out.print("Please enter non-negative integer to be added: ");
        hold = input.nextInt();
            while(hold&#60;0)
            {    
              System.out.print("That number is negative, please enter another one");
              hold = input.nextInt();
            }
        sum = hold + sum;
        System.out.print("Do you wish to add another integer?(1 - yes 2 - no: ");
        option = input.nextInt();
        count = count +1;
        }while(option == 1);
    [b]System.out.printf("The sum of the ", count,"integer(s) is ", sum);[/b]
    
    }
    
}
Please try replacing bold line with below.System.out.println(&#34;The sum of the &#34;+ count+&#34; integer(s) is &#34; + sum);Do let me know if this works.ThanksSachin
</description>
<pubDate>Sun, 24 Sep 2006 05:56:16 -0700</pubDate>
</item>
<item>
<title>What sort of certifications are there for Java? in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=557#557</link>
<guid isPermaLink="false">557@http://www.w3exchange.com</guid>
<description>Topic: What sort of certifications are there for Java?

Message: What sort of certifications are there for Java?Sun Java Technology CertificationView this link for detailhttp://www.sun.com/training/certificati &#8230; /index.xmlWho conducts the examinaitions?Sun Certified Training CentersWhat is the best why to study for them?Couldn't get you. Does anyone have one?I don't have it but my friend does have one.Has it changed your life if you do get one?Yes it does change ur life once you are Sun Certified. You can get big projects as well as be highly paid.Please visit http://java.sun.com for more details.ThanksSachin
</description>
<pubDate>Sun, 24 Sep 2006 05:39:30 -0700</pubDate>
</item>
<item>
<title>What sort of certifications are there for Java? in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=555#555</link>
<guid isPermaLink="false">555@http://www.w3exchange.com</guid>
<description>Topic: What sort of certifications are there for Java?

Message: What sort of certifications are there for Java?Who conducts the examinaitions?What is the best why to study for them?Does anyone have one?Has it changed your life if you do get one?
</description>
<pubDate>Sun, 24 Sep 2006 01:42:14 -0700</pubDate>
</item>
<item>
<title>Java code - Please see this code in Script Forums : Java</title>
<link>http://www.w3exchange.com/view_topic.php?pid=538#538</link>
<guid isPermaLink="false">538@http://www.w3exchange.com</guid>
<description>Topic: Java code - Please see this code

Message: If someone could look over this code i wrote and see if its done correctly i would greatly appreciate it.. i use netbeans and when i click &#34;run&#34; the ms dos window doesn't come up and run the program like dev c does for c++its supposed to ask for integers and add'em up and give a sum at the end, it shouldn't accept negative integers.
Code::import java.util.Scanner;

public class Main 
{
    
    /** Creates a new instance of Main */
    public Main() 
    {
    
    
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) 
    {
        // TODO code application logic here
       Scanner input = new Scanner( System.in );
        
        int hold, sum,option,count;
        sum = 0;
        do 
        {    
        count = 0;    
        hold = 0;
        System.out.print("Please enter non-negative integer to be added: ");
        hold = input.nextInt();
            while(hold&#60;0)
            {    
              System.out.print("That number is negative, please enter another one");
              hold = input.nextInt();
            }
        sum = hold + sum;
        System.out.print("Do you wish to add another integer?(1 - yes 2 - no: ");
        option = input.nextInt();
        count = count +1;
        }while(option == 1);
    System.out.printf("The sum of the ", count,"integer(s) is ", sum);
    
    }
    
}
</description>
<pubDate>Thu, 21 Sep 2006 06:41:21 -0700</pubDate>
</item>
</channel>
</rss>
