Home Tutorialhelp Comment how do u complete this and explain

 
 

Comment

jorge
how do u complete this and explain ,
December 8, 2008 at 9:59 PM

public class Fraction {
private int myNum, myDenom;
private double myValue;

/**Creates a new instance of Fraction*/
public Fraction() {
myNum=1;
myDenom=1;
myValue=1.0;
}
public Fraction(int n,int d)
{
myNum=n;
myDenom=d;
myValue=(double)n/(double) d;
}
private static Fraction parseInput(String s)
{
int slash,n,d;
slash=s.indexOf("/");
//add code to complete method here
Fraction f=new Fraction(n,d);
return f;
}


View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Java Interview Questions

Interview Tips - Java Interview Questions
Interview Tips  Hi, I am looking for a job in java/j2ee.plz give me interview tips. i mean topics which i should be strong and how to prepare. Looking for a job 3.5yrs experience 

Java Beginners

java explain - Java Beginners
of diagram (heap and stak) also explain how the code arrived at the results in b, b1...java explain  int [] a = [1,2,3]; object o = "123"; string t = "12"; boolean b = o.equals(a); boolean b2 = o.equals (t); boolean b3 = o.equals(w 

Java Beginners

Thank U - Java Beginners
Thank U  Thank U very Much Sir,Its Very Very Useful for Me. From SUSHANT 

Java Beginners

Can u Look to the error plz - Java Beginners
Can u Look to the error plz  this is my code can u modify it plz and give me the result of it when u check it on eclipse or jcreator plz and i will be more thankfull if u do that :) , oh yeh one thing can you draw a flag 

Java Beginners

how to do this?
how to do this?   Given any integer 2D array, design then implement a Java program that will add to each element in the array the corresponding column number and the corresponding row number. Then, it prints the array before 

Software Services

Outsourcing Negotiation Tips,Best Negotiation Tips,Negotiation Tips for Successful Outsourcing
after the negotiation process is complete. Do not make any move till you...Outsourcing-Negotiation Tips Introduction The principles for negotiations are the same as the things you need to keep in mind while choosing a vendor 

Free Magazine

Tips and Tricks
in Java Java provides a lot of fun while programming. This article shows you how...Tips and Tricks        ... to take the control of mouse and keyboard, which lets you do any mouse 

Java Beginners

how to do an measure converter in netbeans - Java Beginners
how to do an measure converter in netbeans   hi im not sure... information on joptionpane visit to : http://www.roseindia.net/java/java-tips/GUI/containers/20dialogs/10joptionpane.shtml http://www.roseindia.net/java/java-tips 

Java Beginners

HOW TO DO WEBSITE INTERFACE FOR JAVA MODULE
HOW TO DO WEBSITE INTERFACE FOR JAVA MODULE  Hi , Greetings. I have created modules in java separately , example student registration , view... an interface ? any 3rd party software like frontpage can do or other method ? PLEASE 

JSP Servlet Questions

can u plz explain the http request methods - JSP-Servlet
can u plz explain the http request methods  can u plz explain http request methods? as well in jdbc...how to delete the duplicate records in database... that we have deleted. Here is the explanation with the query : To explain use we 

Java Beginners

Explain about threads:how to start program in threads?
Explain about threads:how to start program in threads?  import... to do multiple activities simultaneously in a process. For example:- If you want... and print it simultaneously. Threads are called light weight processes. Every java 

Java Interview Questions

Please write code for this program in java and Explain it ? pl'sssssssss
Please write code for this program in java and Explain it ? pl'sssssssss ... findmaxdinosaur (int[] years); Java : public int findMaxdinosaur (int[] years);  ........... the output should be how many dinosaur are alive more in a year. that's all 

Java Beginners

What are events? Explain how Event handling in Java?
What are events? Explain how Event handling in Java?  What are events? Explain how Event handling in Java?   Hi, The Events are the integral part of the java platform. Sometimes we want one object to perform shorten 

Struts Questions

Explain struts.jar file - Struts
Explain struts.jar file   Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain 

Eclipse Plugins

Other
Other      ... generate any Textcontent based on a selected Document-Model (xml-Model or java... be useful to other developers as well. Currently there are: * com.nightlabs.ant 

Software Services

Offshore Outsourcing Tips,Useful Offshore Outsourcing Tips,Helpful Outsourcing Tips
Offshore Outsourcing Tips Introduction What is the perfect... outsourcing. However here are some tips that can help you... the business logic and all other information the vendor will need 

Java Beginners

complete the code (palindrome) - Java Beginners
complete the code (palindrome)  Write a program that checks if a word.... complete the below code (step 3 and step 4 are not solved). import... is the standard code with full of description,so go according that u will sure find 

Hibernate Interview Questions

what is java and why do i need it?
what is java and why do i need it?  Hi, Please tell me what is Java and why do i need it? Is it free to download? Also explain me how to write and test my first Java Application? What is the configuration or system requirement 

Java-Tutorials

Java for complete beginners
are not considered secure and are not portable. Java on the other hand is portable...Java Guide is available at RoseIndia that help beginners to master... and application development for mobile phone, Java is in great demand and so 

Java Beginners

How to Explain different way of using thread?
How to Explain different way of using thread?  Hi, How to explain how to using different thread in Java program 

JDBC Questions

Subtraction of a date from Sql and other from java.
Subtraction of a date from Sql and other from java.  I want... retrieve from java. I want the difference between the two date in the integer form. how do i do it ? Please help me. Thank you !   import java.sql.*; import 

Java Beginners

How to Explain different way of using thread?
How to Explain different way of using thread?  Hi, How to explain how to using different thread in Java program........   Hi, There are different types Thread in Java program. Here is the explain how to using thread 

Java Beginners

what should i do next?? - Java Beginners
if u don't know how to install the software of java also u can from him.He...what should i do next??  I know java basics.actully i passed the SCJP exam.Then now i have no idea about what should i do next.I like to come 

JSP Servlet Questions

Selection based on other selection in jsp
based on the category would come in the product drop-down list. How can I do...Selection based on other selection in jsp  I am trying to create... category there are products which are taken from a ms access table using a java 

Java Beginners

How do I compare strings in Java?
How do I compare strings in Java?  How do I compare strings in Java 

Java Beginners

How do I decompile Java class files?
How do I decompile Java class files?  How do I decompile Java class files 

Java Beginners

How do I initialize a byte array in Java?
How do I initialize a byte array in Java?  How do I initialize a byte array in Java 

Programming Tutorials

Dojo Tool tips
Dojo Tool tips           In this section, you will learn about the tool tips and how to developed it in dojo.  Tool tips :  This is a GUI 

Programming Tutorials

Dojo Tool tips
Dojo Tool tips           In this section, you will learn about the tool tips and how to developed it in dojo.  Tool tips :  This is a GUI 

Java Beginners

Dont Do this - Java Beginners
Dont Do this  Whenever you guys ask a question please describe your query? Otherwise you lost your time and other who are given answer to you. thanks Rajanikant 

Software Services

Useful Negotiation Tips on Outsourcing, Helpful Negotiation Tips
to the vendor only after the negotiation process is complete. Do not make any...Outsourcing-Negotiation Tips Introduction The principles for negotiations are the same as the things you need to keep in mind while 

Java Beginners

Do needful - Java Beginners
Do needful  Hai how can I do the string to Hex in java. Pls help me  use conversion concept  Hi friend, import java.io.*; import java.io.IOException.*; public class StringToHexa{ public static void 

JSP Servlet Questions

How do i do the coding for 'leaving a comment' in java
How do i do the coding for 'leaving a comment' in java  i am designing a webpage.In my webpage i want to add the option of adding a comment by the readers of the page.how do i do 

Web Hosting Tutorial

Complete Webhosting Guide, Search Web hosts, Find Plans
will provide you complete guide on web hosting and show you how you can use... uploading your website on the internet. We will also explain you how to maintain...? In this article we will explain you how a web hosting server works?   

Hibernate Questions

What do you understand by Hibernate in Java?
What do you understand by Hibernate in Java?  Hey, do you know about Hibernate in Java? I have to learn it for my next project. What is the best and probably most easiest way to learn this Hibernate stuff? How it is beneficial 

Java Beginners

Explain types of java programs
Explain types of java programs  Explain types of java programs   Types of Java Programs: Standalone Applications Web Applications Enterprise Applications Console Application Web services 

Java Beginners

how to do combinations in java - Java Beginners
how to do combinations in java  i have 2 arrayLists. i want do...()); } } } For more information on Java.util Package visit to : http://www.roseindia.net/java/example/java/util/ Thanks 

Java Beginners

How do I do this program? I'm new to Java programming...
How do I do this program? I'm new to Java programming...  Suppose you want to print out numbers in brackets, formatted as follows: [1] [2] [3] and so on. Write a method that takes two parameters: howMany and lineLength 

Software Services

Outsourcing Communication Tips,Useful Cultural Tips in Offshore Outsourcing,Communication and Culture Tips
if they can plan how to communicate and evaluate the impact. Other crucial skills...Communication and Culture Tips in Offshore Outsourcing Relationships Introduction Many offshore outsourcing and other business arrangements run 

Hibernate-Tutorials

Complete Hibernate 4.0 Tutorial
This section contains the Complete Hibernate 4.0 Tutorial. Complete Hibernate 4.0 Tutorial Hibernate is a Object-relational mapping (ORM) tool for Java. It was initiated by Gavin King in 2001. ORM methodology 

Java Beginners

can u plz try this program - Java Beginners
can u plz try this program  Write a small record management application for a school. Tasks will be Add Record, Edit Record, Delete Record, List.... --------------------- <%@ page language="java 

Java Beginners

code and specification u asked - Java Beginners
code and specification u asked  you asked me to send the requirements... can build in java are extensive and have plenty of capability built in. We... requirements of the project are as follows. Language : Java (JDK1.5.0_06 

Java Beginners

how do you parse by reference in java(with JGrasp)
how do you parse by reference in java(with JGrasp)  i am a 1st year beginner in java programming(GR 10) at hillcrest High School in south Africa My question is how do you parse by reference in java(with JGrasp) please help me i 

Swing AWT

How to invoke other java class by selecting from dropdown menu and subsequently clicking button in java swing application
How to invoke other java class by selecting from dropdown menu and subsequently clicking button in java swing application  Hello Sir, first of all thanx and congratulations to u all guys for helping programmers like us who 

Swing AWT

How to invoke other java class by selecting from dropdown menu and subsequently clicking button in java swing application
How to invoke other java class by selecting from dropdown menu and subsequently clicking button in java swing application  Hello Sir, first of all thanx and congratulations to u all guys for helping programmers like us who 

Swing AWT

How to invoke other java class by selecting from dropdown menu and subsequently clicking button in java swing application
How to invoke other java class by selecting from dropdown menu and subsequently clicking button in java swing application  Hello Sir, first of all thanx and congratulations to u all guys for helping programmers like us who 

Java Beginners

complete the program - Java Beginners
complete the program   Problem Task Your task is to develop part... 2 Sorted list: 1 2 4 7 9 please complete the following program -solve proble...]; /* * * complete this method 

Java Beginners

how do i write a java program for this??
how do i write a java program for this??  ‚??Ask the user if they have a dog. If ‚??yes‚??, ask the user how old is and compute the dog‚??s age in human years. Display the output. If ‚??no‚?? ask the user their age and compute 

Free Magazine

Tips & Tricks
screen button on the keyboard, same way we can do it through java programming...Tips & Tricks          Here are some basic implementations of java language, which you would 

Java Beginners

plz explain me the output of program - Java Beginners
plz explain me the output of program  Hi friends, can u please explain me the output of below program with proper explanation of each and every line. class ThisDemo { int a,b,c; void show(int a,int b,int c) { this.a 

Java-Tutorials

Complete Java programming tutorials for beginners
Complete collection of Java programming tutorials for beginners is available at Roseindia that can be referred and used by anyone who wants to learn Java... posted by Java programmers. Complete collection of Java programming 

Java Beginners

Explain the concept of thread priorities in Java.
Explain the concept of thread priorities in Java.  Explain the concept of thread priorities in Java 

Programming Tutorials

Explain how you overcame a major obstacle
how your assets meet what the organization needs. Do not mention any other... Explain how you overcame a major obstacle       Qus. Explain how you overcame a major 

JSP Servlet Questions

write a program in java to demonstrate the complete life cycle of servlet:
write a program in java to demonstrate the complete life cycle of servlet:  l have an assignment question. i don't know how to write the code for this program. my question is :Write a program in Java to demonstrate the complete 

JDBC-Tutorials

Complete JDBC Tutorial
Complete JDBC ( Java Database Connectivity ) Tutorial In this complete JDBC.... In these tutorial you will learn the how to use JDBC in your java application... gives the description of ResultSet interface, and how to use it, in a java 

Java Tips and Examples

Do-while loop in Java
Do-while loop in Java In this section you will learn about do-while loop in Java. do-while loop is similar to while loop but the difference is do-while loop... condition repeatedly and run at least once. For that we need a do-while loop so 

Java Tips and Examples

do-while Loop in Java
do-while Loop in Java       In some conditions in java, you need to run some statements...; while(condition); In this example you will see how to use the do-while loop 

J2EE

The Complete Spring Tutorial
The Complete Spring Tutorial In this tutorial I will show you how you can integrate struts, spring and hibernate in your web... of enterprise applications in Java technologies. It is an open source framework begin 

Java-Tutorials

How to learn Java easily?
is Java, how it is different from other programming language, how to install...If you are wondering how to learn Java easily, well its simple, learn it online with RoseIndia. It provides a detailed and complete Java course covering 

Software Services

SEO Copywriting Tips,Best SEO Copywriting Services,Useful SEO Copywriting Tips
SEO Copywriting Tips Are you interested in knowing the concepts of SEO copywriting? What exactly do you understand by SEO copywriting? The technique... of achieving high search engine page ranking. Search engines such as Yahoo and Google do 

Java Server Faces Questions

required treenodes checkboxes are not clicking if u change the url - Java Server Faces Questions
required treenodes checkboxes are not clicking if u change the url  ...(1001,1007,1002,1005,1008,1002,1009,1010,1008)are getting clicked. But when u again add or remove the album...(); try { do { read = is.read(rb); if (read>0) { os.write 

Software Services

Tips for Successful Outsourcing,Useful Tips of Successful Outsourcing,Tips and Techniques for Successful Outsourcing
Tips for Successful Outsourcing Outsourcing has proved a boon to many.... The client company should keep in the mind the technical know- how and expertise... the extent of risk and give a fair idea of how well the service provider is going 

Java Interview Questions

How do I write a correct micro-benchmark in Java?
How do I write a correct micro-benchmark in Java?  How do I write a correct micro-benchmark in Java 

Java Beginners

How do I set environment variables from Java?
How do I set environment variables from Java?  How do I set environment variables from Java 

Hibernate Questions

How do you map Java Objects with Database tables?
How do you map Java Objects with Database tables?  Hi, How do you map Java Objects with Database tables? thanks 

Software Services

Successful Tips for Offshore Outsourcing,Helpful Tips of Success Offshore Outsourcing
Success Tips for Offshore Outsourcing Introduction Offshore outsourcing has become a business tool every organization turns to at some time or the other... country and culture. Given below are some tips for successful offshore 

Java Beginners

What is a vector in Java? Explain with example.
What is a vector in Java? Explain with example.  What is a vector in Java? Explain with example.   Hi, The Vector is a collect of Object... related to Vector in Java program 

Java Beginners

How do I handle the reaction of a circle and a semi-circle colliding in java?
How do I handle the reaction of a circle and a semi-circle colliding in java?  How do I handle the reaction of a circle and a semi-circle colliding in java 

Java Beginners

How do i create the node for target SMO in java..???
How do i create the node for target SMO in java..???  How do i create the node for target SMO in java..??? or else whats the method for accessing the target SMO 

Java Beginners

please explain this program
please explain this program  public class MainClass { public static void main(String[] args) { System.out.println("Java 

Java Beginners

How to do Null validation for a boolean variable - Java Beginners
How to do Null validation for a boolean variable  How to do Null validation for a boolean variable in JAVA?  Hi friend, For solving the problem visit to : http://www.roseindia.net/java/master-java/variables 

Java Interview Questions

Explain instance in java - Java Interview Questions
Explain instance in java  Hi Friends, can you explain instance in java. In general instance means "occurence of something" . In java what is instance 

JSP Servlet Questions

How do i start to create Download Manager in Java - JSP-Servlet
How do i start to create Download Manager in Java  Can you tell me from where do i start to develop Download manager in java 

Java-Tutorials

How to run a Java program in CMD
discussed how to write and run Java program in CMD. Tips to run Java program... a notepad or any other editor and write a small program in Java as given below...! How to Program in Java What is Programming 

Java-Tutorials

Do While Loop in Java
Do while loop in Java There are three loops most commonly used in Java e.g..... Do while loop is java is slightly different with While loop as in While loop...); In this example you will see how to use the do-while loop statement. The values 

Web Development

Tips for Betterment of Social Media Marketing
of ways to do this through votes, comments and other such things. Creating a video...Tips for Better Social Media Marketing Marketing is only as good as the method... for a person to sign up for. All of this might leave an individual wondering how 

Java Beginners

How do I generate random number?
How do I generate random number?  In my Java program there is a requirement of generating random numbers between two given numbers. How do I write...: Generate random numbers in Java. Thanks 

Java Beginners

i want to copy files from one machine to other using java and the code will be running on third machine
i want to copy files from one machine to other using java and the code... say 'A' to some other machine say 'B' by using the java program running on third machine say 'c'. So , can you help me on this that how can i do this using 

Java Beginners

how do i begin a two dimensional array?
how do i begin a two dimensional array?  I'm new to java programming and need to create a two dimensional array that enters exactly what is entered in the first dimension and then the first non-white space character of what 

Servlet Interview Questions

How do I throw a 404 error from within a java servlet?
How do I throw a 404 error from within a java servlet?  How you can write code in Servlet for throwing the httpd error 404? How to add the configuration for handling the not found error in the web.xml file? Thanks    

Hibernate Interview Questions

Explain the persistence class in hibernate?
Explain the persistence class in hibernate?  What is persistence class in hibernate?   Persistence class are simple POJO classes... classes the client of java persistence API 

JavaScript Questions

how to make use of jerry's java image processing filter in java application?is there anyway to do this?
how to make use of jerry's java image processing filter in java application?is there anyway to do this?   how to make use of jerry's java image processing filter in java application?is there anyway to do 

Java Beginners

program on helloworld :explain
}   Class is the building block in Java, each and every methods &... in the Java program and java program can't run without main method. JVM calls the main... in a java program. Here is the main method: public static void main(String[] args 

Java Beginners

program on helloworld :explain
is the building block in Java, each and every methods & variable exists within...". The main Method: The main method is the entry point in the Java program and java.... This method is always first thing that is executed in a java program. Here 

Java-Tutorials

How to learn Java?
If you are want to be a Java developer in future and are wondering how to learn Java language than there are two ways you can do that. One is the classroom... your home. The online training of Java has many advantages over classroom 

Web Development

Top 10 Tips for Good Website Design
presence. Good website design tips reflect on the art of mastering the traffic... are our picks on top 10 tips for good website design. Enhance your page speed... to 3 seconds of time. So the first good website design tips that remain 

JavaMail Questions

I want complete tutorial on advanced java
I want complete tutorial on advanced java  I am studying advanced java like servlets, JSP's RMI EJB's JDBC & all stuff like this i want some tutorial file so that i can download it & read can anyone help me?    

Java Beginners

Explain various access modifiers and their visibility.
Explain various access modifiers and their visibility.  Explain various access modifiers and their visibility.   Please visit the following link: Java Access Modifiers 

JSP Servlet Questions

how to Use jsp:setProperty to set one bean in other bean while to be set bean is of type java.util.List<beantype>
how to Use jsp:setProperty to set one bean in other bean while to be set bean is of type java.util.List  I have 3 Java POJOs as follows Class... here, But I am not getting how do I set the value of chapters properties 

Java Beginners

How to create a class in java
How to create a class in java  I am a beginner in programming and tried to learn how to do programming in Java. Friends please explain how can I create a class in Java 

Programming Tutorials

While and do-while
While and do-while       Nested classes Here is another advantage of the Java, object... in this section. A named inner class looks just like any other class, except 

Java-Tutorials

The while and do
While and do-while      ...\xml>java Bonjour Bonjour Bonjour Bonjour Bonjour... that the condition becomes false and the loop terminates. Have a look at do 

Java Beginners

complete this code (insertion sort) - Java Beginners
complete this code (insertion sort)  Your task is to develop part... inserted at last position of new list. complete step 4 in the uncompleted method... [unsorted.length]; /* * * complete this method 

Ajax Questions

Auto complete of word search using ajax with java
Auto complete of word search using ajax with java  I want to display the list of words when I type the first letter of the word in a text box. I am using jsp to design the form. I want ajax sample to achieve this feature. Its 

Ajax Questions

Auto complete of word search using ajax with java
Auto complete of word search using ajax with java  I want to display the list of words when I type the first letter of the word in a text box. I am using jsp to design the form. I want ajax sample to achieve this feature. Its 

Java Beginners

How can I write a GUI stack program by Java to push Image files instead of other data type items?
How can I write a GUI stack program by Java to push Image files instead of other data type items?   How can I write a GUI stack program by Java to push Image files instead of other data type items? for the push instruction I 

IDE Questions

How do i enable java1.5 in netbeans5.5 - IDE Questions
How do i enable java1.5 in netbeans5.5  what is the steps to enable Java 1.5 in netbeans 5.5 

Java Interview Questions

how do i upload a file by using servlet or jsp?
how do i upload a file by using servlet or jsp?  hi plz tell me the write java code 

Programming Tutorials

Increase Web Traffic,How to Increase Web Traffic,Increase Website Traffic,Free Tips to Increase Website Traffic
How to Increase Web Traffic This tutorial will help you increase your... website is good and listed in the search engines. Other options besides search.../webpromotion.shtml. It explains how search engines find and rank web pages, with an emphasis 

Java Beginners

Explain the parameters of Font class constructor.
Explain the parameters of Font class constructor.  Explain the parameters of Font class constructor.   Java Font class: Font(String name,int style,int size): It creates a new Font from the specified name, style 

Advertisements Advertisements
 

 

 

DMCA.com