Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Holly Fox   on Apr 18 In Java Category.

  
Question Answered By: Alberta Miller   on Apr 18

my problem remains unsolved.when i try with import  java.Text.*; the compiler
says:expo.java [2:1] Package java.Text. not found  in import.
import java.Text.*;

and when i try with import org.w3c.dom.Text; it says:

expo.java [11:1] Cannot use operator new for this type
Text cin=new Text();
^
expo.java [11:1] Cannot parse initializer
Text cin=new Text();
^
expo.java [13:1] No method found matching readDouble()
x=cin.readDouble();


here is my program:

import java.io.*;
import Text;
class expo
{
public static void main(String args[]) throws IOException
{
double factor,us,expo,x;
factor=1;
us=1;
expo=1;
Text cin=new Text();
System.out.println("please enter a number");
x=cin.readDouble();
for(double sayi=1;sayi<=200;sayi++)
{ factor*=sayi;
us*=x;
expo+=us/factor;
}
System.out.println("the exponent of your number is="+expo);
}
}

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Class Text not found in type declaration or import. Or get search suggestion and latest updates.


Tagged: