niusouti.com

Which of the following statements best describes the relationship between a logical volume and a journaled file system (JFS)?()A.Increasing the size of a logical volume also increases the size of the file systemB.Reducing the size of a logical volume requ

题目
Which of the following statements best describes the relationship between a logical volume and a journaled file system (JFS)?()

A.Increasing the size of a logical volume also increases the size of the file system

B.Reducing the size of a logical volume requires reducing the size of the file system first

C.Increasing the size of a file system requires increasing the size of the logical volume first

D.Increasing the size of a file system also increases the size of the logical volume when necessary


相似考题
更多“Which of the following statements best describes the relationship between a logical volume and a journaled file system (JFS)?() ”相关问题
  • 第1题:

    在程序中,用户输入一个文件名,根据用户输入显示相应文件的信息。

    注意:请勿修改main()主方法和其他已有语句内容,仅在横线处填入适当语句。

    ______java.io.*;

    public class basic

    {

    public static void main(String[] args)

    {

    InputStreamReader reader;

    BufferedReader in;

    System.out.println("请输入文件名: ");

    try

    {

    reader=new InputStreamReader(______);

    in=new BufferedReader(reader);

    String filename=in.readLine();

    File file=new File(filename);

    System.out.println("文件名:"+file.______);

    System.out.println("路径:"+file.getAbsolutePath());

    System.out.println("大小:"+file.length());

    }

    catch(Exception e)

    {

    e.printStackTrace();

    }

    }

    }


    正确答案:import System.in getName()
    import System.in getName() 解析:本题考查知识点:Java类库中常用类和接口、文件和文件I/0、输入输出。解题思路:题中reader从系统获得输入流,从这个流中得到用户输入的字符串作为文件名,找到文件,进而得到文件的相关信息。Java的类库需要引入以后才能使用,关键字import就是声明需要引入的类或包。因此第1个空的答案是import。Java的输入输出是以流的形式来完成的。InputStreamReader的对象reader从系统输入中读取输入流,保存在相应的缓冲区中,因此第2个空的答案是System.in。BufferedReader对象则是从这个缓冲区中读取数据,使用BufferedReader类的readLine()方法即可获得输入流中的一行输入。在Java程序中,文件作为类的一个实例来处理,File类具有很多与文件相关的方法,比如获得上级目录名(getParent()方法)、路径(getPath()方法)等,第3个空就是使用getName()方法获取文件的文件名。

  • 第2题:

    下列程序中,要求输出一个特定文件(这里是ex2_1.java)的相关信息,包括文件的名字,相对路径以及文件的长度。请将程序补充完整。

    程序运行结果如下:

    name:ex2_1.java

    path:ex2_1.java

    length: 299

    import java.io.*;

    public class ex2_1{

    public static void main(String[] args) {

    File file2_1 = new File("ex2_1.java");

    System.out.println("name:"+file2_1.____________ );

    System.out.println("path:"+file2_1.____________ );

    System.out.println("length:"+file2_1.____________ );

    }

    }


    正确答案:getName() getPath() length()
    getName() getPath() length() 解析:本题主要考查Java文件以及Java类库中的File类的常用方法。解题关键是熟记Java的File类的常用方法:getName(), getPath(),length()等。在本题中,这3个空分别对应填入这3个方法即可。

  • 第3题:

    请解释R函数getwd()、setw()的作用,以及system.file(package = "base")的含义。


    A

  • 第4题:

    JAVA File类执行下面这段程序为什么会出现异常 File file=new File(args[0]); 这句是什么意思??

    import java.io.*;

    import java.util.*;

    public class FileClass {

    /**

     * @param args

     */

    public static void main(String[] args) {

    // TODO Auto-generated method stub

    try{

    File file=new File(args[0]);

    System.out.println(args[0]+"文件");

    if(file.isFile()){

    //是否为文件

    System.out.print(file.canRead()?"可读":"不可读");

    System.out.print(file.canWrite()?"可写":"不可写");

    System.out.print(file.length()+"字节");//注意不能调用数组类型 File[] 的 length()例:File[] files=file.listFiles();不可以这么调用filess.length()

    }

    else{

    //列出所有文件及目录

    File[] files=file.listFiles();

    ArrayList<File> fileList=new ArrayList<File>();

    for(int i=0;i<files.length;i++){

    //先列出目录

    if(files[i].isDirectory()){

    //是否为目录

    //取得路径名

    System.out.println("路径"+"[  "+files[i].getPath()+"  ]");

    }

    else{

    //文件先存入fileList,待会再列出

    fileList.add(files[i]);

    }

    }

    //列出文件

    for(File f:fileList){

    System.out.println(f.toString());

    }

    System.out.println();

    }

    }

    catch(ArrayIndexOutOfBoundsException e){

    System.out.println("using:java FileDemo pathname");

    }

    }

    }

    结果:using:java FileDemo pathname

    是不是创建的对象所代表的文件没有被创建成功


     

    File file=new File(args[0]); 就是创建一个args[0]所指文件路径的文件对象。出现异常的原因是:你把args[0]作为文件路径,而你运行时又没有指定。

     

  • 第5题:

    设有类定义如下:

    class InOut{

    String s= new String("Between");

    public void amethod(final int iArgs){

    int iam;

    class Bicycle{

    public void sayHello(){

    //Here

    }

    }

    }

    public void another(){

    int iOther;

    }

    }

    以下哪些语句可以安排在//Here处 ?

    A. System.out.println(s);

    B.System.out.println(iOther);

    C. System.out.println(iam);

    D. System.out.println(iArgs);


    正确答案:AD