0

import java.util.*;

import Jama.Matrix;

import java.util.*;

import Jama.Matrix;


public class Suceses
{
   public static void main(String[] args)
   {
   System.out.println("회전할 각도를 입력하시오 :");
   Scanner a = new Scanner(System.in);
   int kakdo = a.nextInt(); 
   System.out.println(a);
   double rad = (kakdo*Math.PI)/180;
   int x= 50;
   int y= 30;
    Matrix A = new Matrix(new double[][]
          {
          {Math.cos(rad),Math.sin(rad)},
          {-((Math.sin(rad))),Math.cos(rad)}
          }); 
   Matrix B = new Matrix(new double [][] {{x},{y}}); 

   Matrix C = A.solve(B);

   System.out.println(A);
       A.print(9, 6);
   System.out.println(C);
       C.print(6, 9);

When I run this code. I have some problem. problem sentence is "java.util.Scanner[delimiters=\p{javaWhitespace}+][position=2][match valid=true][need input=false][source closed=false][skipped=false][group separator=\,][decimal separator=.][positive prefix=][negative prefix=\Q-\E][positive suffix=][negative suffix=][NaN string=\Q?\E][infinity string=\Q∞\E]"

Please somebody help us .....!!!!!!

4
Contributors
4
Replies
38
Views
1 Year
Discussion Span
Last Post by Markland
Featured Replies
  • No. That would have thrown an `InputMismatchException`. His output is just the result of calling toString on a Scanner object when trying to print it. Read More

0

Line 13 you print the Scanner object a
The output you see is the description of your scanner object.
I guess you wanted to print the user's input, kakdo?

1

No. That would have thrown an InputMismatchException. His output is just the result of calling toString on a Scanner object when trying to print it.

0

Nuruhee,

Can you be clearer as to your objective and what you need the code to do.

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.